org.jppf.server.nio.multiplexer.generic
Class OutboundChannelHandler

java.lang.Object
  extended by org.jppf.server.nio.AbstractSocketChannelHandler
      extended by org.jppf.server.nio.multiplexer.generic.OutboundChannelHandler

public class OutboundChannelHandler
extends AbstractSocketChannelHandler

They handle (re)connection services when needed. Instances of this class are used when a multiplexer needs to connect to a remote multiplexer.

Author:
Laurent Cohen

Field Summary
 
Fields inherited from class org.jppf.server.nio.AbstractSocketChannelHandler
host, port, server, socketClient, socketInitializer
 
Constructor Summary
OutboundChannelHandler(NioServer server, String host, int port, ChannelWrapper initialKey)
          Initialize the channel with the specified host and port.
 
Method Summary
protected  SocketChannelClient initSocketChannel()
          Initialize the channel client.
protected  void postInit()
          This method is called after the channel is successfully conntected.
 
Methods inherited from class org.jppf.server.nio.AbstractSocketChannelHandler
getSocketClient, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutboundChannelHandler

public OutboundChannelHandler(NioServer server,
                              String host,
                              int port,
                              ChannelWrapper initialKey)
Initialize the channel with the specified host and port.

Parameters:
server - the NioServer to which the channel is registred.
host - the remote host to connect to.
port - the port to connect to on the remote host.
initialKey - the key associated with the initial connection.
Method Detail

initSocketChannel

protected SocketChannelClient initSocketChannel()
                                         throws Exception
Initialize the channel client.

Specified by:
initSocketChannel in class AbstractSocketChannelHandler
Returns:
a non-connected SocketChannelClient instance.
Throws:
Exception - if an error is raised during initialization.
See Also:
AbstractSocketChannelHandler.initSocketChannel()

postInit

protected void postInit()
                 throws Exception
This method is called after the channel is successfully conntected.

Specified by:
postInit in class AbstractSocketChannelHandler
Throws:
Exception - if an error is raised while performing the initialization.
See Also:
AbstractSocketChannelHandler.postInit()


Copyright © 2005-2010 JPPF Team.