org.exolab.core.mipc
Interface MultiplexConnectionIfc

All Known Implementing Classes:
MultiplexConnection, MultiplexSSLConnection

public interface MultiplexConnectionIfc


Method Summary
 void deregister(java.lang.String label)
          Deregister a multiplex channel.
 void disconnected()
          This is called by the demultiplexer when the channel has been abnormally terminated.
 void finish()
          Gracefully stop the MultiplexSSLConnection thread.
 java.lang.String getHost()
          Return the hostname that this connection bound too
 int getPort()
          Return the port that this connection is bound too
 org.exolab.core.mipc.MessageOutput register(java.lang.String label, org.exolab.core.mipc.MessageOutput messageOutput)
          Register a new multiplex channel.
 void run()
          The workhorse for the MultiplexConnection.
 void setDisconnectionEventListener(DisconnectionEventListener listener)
          Set the listener that will be called back when the multiplex connection is dropped
 

Method Detail

finish

void finish()
Gracefully stop the MultiplexSSLConnection thread.


setDisconnectionEventListener

void setDisconnectionEventListener(DisconnectionEventListener listener)
Set the listener that will be called back when the multiplex connection is dropped

Parameters:
listener - - the disconnection event listener

run

void run()
The workhorse for the MultiplexConnection. Typically this method is invoked as a result of calling 'start' on the MultiplexConnection. MultiplexConnection derives from Thread.


register

org.exolab.core.mipc.MessageOutput register(java.lang.String label,
                                            org.exolab.core.mipc.MessageOutput messageOutput)
Register a new multiplex channel. 'label' is the identifier for the channel and 'messageOutput' is where inbound messages are placed. If there is an existing channel, it is overwritten. The return value is a MessageOutput that is used by the channel producer to send messages. The interface encapsulates a MutliplexOutputStream.

Parameters:
label - The channel name to register for
messageOutput - Inbound messages are placed here
Returns:
MessageOuput Channel producers place outbound message on this stream.

deregister

void deregister(java.lang.String label)
Deregister a multiplex channel.

Parameters:
label - The channelname to unregister

disconnected

void disconnected()
This is called by the demultiplexer when the channel has been abnormally terminated. It will call finish on the connection and then notify any registered listener


getHost

java.lang.String getHost()
Return the hostname that this connection bound too

Returns:
String - the host name

getPort

int getPort()
Return the port that this connection is bound too

Returns:
int - the port number


Copyright © 1999-2012 The Exolab Group. All Rights Reserved.