|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.beepcore.beep.lib.Reply
Provides a synchronous abstraction for receiving BEEP reply messages.
The caller may block using getNextReply when as it waits
for incoming messages.
Reply is produced by the Channel.sendMSG
method.
Please note that the other Channel send operations do NOT
return this class as a result.
Channel.sendMSG(org.beepcore.beep.core.OutputDataStream, org.beepcore.beep.core.ReplyListener)| Constructor Summary | |
Reply()
|
|
| Method Summary | |
Message |
getNextReply()
Returns the reply corresponding to a Channel.sendMSG
call as a Message. |
boolean |
hasNext()
Indicates if there are more messages to retrive. |
void |
receiveANS(Message message)
Called when the underlying BEEP framework receives a reply of type ANS. |
void |
receiveERR(Message message)
Called when the underlying BEEP framework receives a reply of type ERR. |
void |
receiveNUL(Message message)
Called when the underlying BEEP framework receives a reply of type NUL. |
void |
receiveRPY(Message message)
Called when the underlying BEEP framework receives a reply of type RPY. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Reply()
| Method Detail |
public Message getNextReply()
throws BEEPInterruptedException
Channel.sendMSG
call as a Message. Always call hasNext
previous to calling getNextReply to discover whether or not
getNextReply should be called again.
If all messages for this reply have been returned, a subsequent call
will throw a NoSuchElementException.
BEEPException
java.util.NoSuchElementException - If the reply is complete and no more
Messages can be returned.
BEEPInterruptedExceptionMessage,
hasNext()
public boolean hasNext()
throws BEEPInterruptedException
hasNext returns true the reply to the previous
sendMSG is not complete. Call getNextReply
to return unretrieved messages.
BEEPInterruptedExceptiongetNextReply()public void receiveRPY(Message message)
ReplyListener
receiveRPY in interface ReplyListenermessage - BEEP messageMessagepublic void receiveERR(Message message)
ReplyListener
receiveERR in interface ReplyListenermessage - BEEP messageMessagepublic void receiveANS(Message message)
ReplyListener
receiveANS in interface ReplyListenermessage - BEEP messageMessagepublic void receiveNUL(Message message)
ReplyListener
receiveNUL in interface ReplyListenermessage - BEEP messageMessage
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||