|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.server.nio.AbstractSocketChannelHandler
public abstract class AbstractSocketChannelHandler
Instances of this class act as wrapper for a connection to a JPPF component.
They handle (re)connection services when needed.
| Field Summary | |
|---|---|
protected String |
host
The remote host to connect to. |
protected int |
port
Port to connect to on the remote host. |
protected NioServer |
server
The NioServer to which the channel is registred. |
protected SocketChannelClient |
socketClient
Wrapper around the underlying socket connection. |
protected SocketInitializer |
socketInitializer
Used to synchronize access to the underlying socket from multiple threads. |
| Constructor Summary | |
|---|---|
AbstractSocketChannelHandler(NioServer server)
Initialize this socket channel handler. |
|
AbstractSocketChannelHandler(NioServer server,
String host,
int port)
Initialize the channel with the specified host and port. |
|
| Method Summary | |
|---|---|
SocketChannelClient |
getSocketClient()
Get the wrapper around the underlying socket connection. |
void |
init()
Initialize this node's resources. |
protected abstract SocketChannelClient |
initSocketChannel()
Initialize the channel client. |
protected abstract void |
postInit()
This method is called after the channel is successfully conntected. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected NioServer server
protected String host
protected int port
protected SocketChannelClient socketClient
protected SocketInitializer socketInitializer
| Constructor Detail |
|---|
public AbstractSocketChannelHandler(NioServer server)
server - the NioServer to which the channel is registred.
public AbstractSocketChannelHandler(NioServer server,
String host,
int port)
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.| Method Detail |
|---|
public void init()
throws Exception
Exception - if an error is raised during initialization.
protected abstract void postInit()
throws Exception
Exception - if an error is raised while performing the initialization.
protected abstract SocketChannelClient initSocketChannel()
throws Exception
SocketChannelClient instance.
Exception - if an error is raised during initialization.public SocketChannelClient getSocketClient()
SocketChannelClient instance.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||