|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.commons.protocol.IgnoringMessageReceiverSupport
public class IgnoringMessageReceiverSupport
Field Summary |
---|
Fields inherited from interface com.genesyslab.platform.commons.protocol.Receiver |
---|
DEF_INPUT_SIZE |
Constructor Summary | |
---|---|
IgnoringMessageReceiverSupport()
|
Method Summary | |
---|---|
void |
clearInput()
Clears input of the receiver. |
int |
getInputSize()
Returns the amount of messages this Receiver can hold before start to "forget stale messages". |
void |
onChannelClosed(ChannelClosedEvent event)
onChannelClosed is called when the channel closed by any reason. |
void |
onChannelError(ChannelErrorEvent event)
onChannelError is called when some not critical channel error occurs. |
void |
onChannelOpened(java.util.EventObject event)
onChannelOpened is called when the channel opening will be completed successfully. |
void |
processMessage(Message message)
|
Message |
receive()
Receives message from the channel. |
Message |
receive(long timeout)
Receives message from the channel. |
void |
releaseReceivers()
Notifies receivers (threads waiting on receive() methods) they should stop waiting and return null. |
void |
setInputSize(int inputSize)
Sets the amount of messages this Receiver can hold before start to "forget stale messages". |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IgnoringMessageReceiverSupport()
Method Detail |
---|
public void clearInput()
Receiver
clearInput
in interface Receiver
public int getInputSize()
Receiver
getInputSize
in interface Receiver
public void setInputSize(int inputSize)
Receiver
setInputSize
in interface Receiver
inputSize
- maximum count of messages stored in receiverpublic void releaseReceivers()
Receiver
releaseReceivers
in interface Receiver
public void onChannelOpened(java.util.EventObject event)
ChannelListener
onChannelOpened
in interface ChannelListener
event
- details.public void onChannelClosed(ChannelClosedEvent event)
ChannelListener
onChannelClosed
in interface ChannelListener
event
- details. See event.getCause() to analize the source reason.public void onChannelError(ChannelErrorEvent event)
ChannelListener
onChannelError
in interface ChannelListener
event
- details. See event.getCause() to analize the problem source.public Message receive()
MessageReceiver
receive
in interface MessageReceiver<Message>
MessageHandler
,
DuplexChannel.setMessageHandler(MessageHandler)
public Message receive(long timeout)
MessageReceiver
Channel
description for timeout values meaning.
receive
in interface MessageReceiver<Message>
timeout
- timeout to waitResponse for message
MessageHandler
,
DuplexChannel.setMessageHandler(MessageHandler)
public void processMessage(Message message)
processMessage
in interface MessageReceiverSupport
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |