Package org.apache.catalina.tribes
Interface ChannelReceiver
- 
- All Superinterfaces:
- Heartbeat
 - All Known Implementing Classes:
- BioReceiver,- NioReceiver,- ReceiverBase
 
 public interface ChannelReceiver extends Heartbeat ChannelReceiver Interface
 TheChannelReceiverinterface is the data receiver component at the bottom layer, the IO layer (for layers see the javadoc for theChannelinterface). This class may optionally implement a thread pool for parallel processing of incoming messages.
- 
- 
Field SummaryFields Modifier and Type Field Description static intMAX_UDP_SIZE
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description ChannelgetChannel()Return the channel that is related to this ChannelReceiverjava.lang.StringgetHost()String representation of the IPv4 or IPv6 address that this host is listening to.MessageListenergetMessageListener()Returns the message listener that is associated with this receiverintgetPort()Returns the listening portintgetSecurePort()Returns the secure listening portintgetUdpPort()Returns the UDP portvoidsetChannel(Channel channel)Set the channel that is related to this ChannelReceivervoidsetMessageListener(MessageListener listener)Sets the message listener to receive notification of incomingvoidstart()Start listening for incoming messages on the host/portvoidstop()Stop listening for messages
 
- 
- 
- 
Field Detail- 
MAX_UDP_SIZEstatic final int MAX_UDP_SIZE - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
startvoid start() throws java.io.IOExceptionStart listening for incoming messages on the host/port- Throws:
- java.io.IOException- Listen failed
 
 - 
stopvoid stop() Stop listening for messages
 - 
getHostjava.lang.String getHost() String representation of the IPv4 or IPv6 address that this host is listening to.- Returns:
- the host that this receiver is listening to
 
 - 
getPortint getPort() Returns the listening port- Returns:
- port
 
 - 
getSecurePortint getSecurePort() Returns the secure listening port- Returns:
- port, -1 if a secure port is not activated
 
 - 
getUdpPortint getUdpPort() Returns the UDP port- Returns:
- port, -1 if the UDP port is not activated.
 
 - 
setMessageListenervoid setMessageListener(MessageListener listener) Sets the message listener to receive notification of incoming- Parameters:
- listener- MessageListener
- See Also:
- MessageListener
 
 - 
getMessageListenerMessageListener getMessageListener() Returns the message listener that is associated with this receiver- Returns:
- MessageListener
- See Also:
- MessageListener
 
 - 
getChannelChannel getChannel() Return the channel that is related to this ChannelReceiver- Returns:
- Channel
 
 - 
setChannelvoid setChannel(Channel channel) Set the channel that is related to this ChannelReceiver- Parameters:
- channel- The channel
 
 
- 
 
-