We know that the Book of Revelation was
given to (the apostle) John when he was in
exile on the Isle of Patmos. (Revelation 1:9)

John may or may not have had any idea that
he would be given this remarkable visit from
the Lord.

But John 21:21 may refer to it. Jesus had
spoke the words, "Feed my sheep", Peter,
looking at John asked, "Lord, and what shall
this man do?" Jesus had answered, "If I will
that he tarry till I come, what is that to thee?
Follow thou me." (verse 22)