org.apache.catalina.tribes

Interface ChannelReceiver

public interface ChannelReceiver extends Heartbeat

ChannelReceiver Interface
The ChannelReceiver interface is the data receiver component at the bottom layer, the IO layer (for layers see the javadoc for the Channel interface). This class may optionally implement a thread pool for parallel processing of incoming messages.

Version: $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (Tue, 24 Oct 2006) $

Author: Filip Hanik

Method Summary
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 receiver
intgetPort()
Returns the listening port
intgetSecurePort()
Returns the secure listening port
voidsetMessageListener(MessageListener listener)
Sets the message listener to receive notification of incoming
voidstart()
Start listening for incoming messages on the host/port
voidstop()
Stop listening for messages

Method Detail

getHost

public 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

getMessageListener

public MessageListener getMessageListener()
Returns the message listener that is associated with this receiver

Returns: MessageListener

See Also: MessageListener

getPort

public int getPort()
Returns the listening port

Returns: port

getSecurePort

public int getSecurePort()
Returns the secure listening port

Returns: port, -1 if a secure port is not activated

setMessageListener

public void setMessageListener(MessageListener listener)
Sets the message listener to receive notification of incoming

Parameters: listener MessageListener

See Also: MessageListener

start

public void start()
Start listening for incoming messages on the host/port

Throws: java.io.IOException

stop

public void stop()
Stop listening for messages
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.