org.jppf.client
Class TaskServerConnectionHandler

java.lang.Object
  extended by org.jppf.client.AbstractClientConnectionHandler
      extended by org.jppf.client.TaskServerConnectionHandler
All Implemented Interfaces:
ClientConnectionHandler, ClientConnectionStatusHandler

public class TaskServerConnectionHandler
extends AbstractClientConnectionHandler

Instances of this class handle the sending and receiving of jobs to and from a JPPF driver.

Author:
Laurent Cohen

Field Summary
 
Fields inherited from class org.jppf.client.AbstractClientConnectionHandler
host, listeners, name, owner, port, socketClient, socketInitializer, status
 
Constructor Summary
TaskServerConnectionHandler(JPPFClientConnection owner, String host, int port)
          Initialize this connection with the specified owner.
 
Method Summary
 void close()
          Close and cleanup this connection handler.
protected  SocketInitializer createSocketInitializer()
          Create a socket initializer for this connection handler.
 void init()
          Initialize the connection.
 void initSocketClient()
          Initialize the underlying socket connection of this connection handler.
 
Methods inherited from class org.jppf.client.AbstractClientConnectionHandler
addClientConnectionStatusListener, fireStatusChanged, getSocketClient, getStatus, removeClientConnectionStatusListener, setStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskServerConnectionHandler

public TaskServerConnectionHandler(JPPFClientConnection owner,
                                   String host,
                                   int port)
Initialize this connection with the specified owner.

Parameters:
owner - the client connection which owns this connection handler.
host - the host to connect to.
port - the port to connect to on the host.
Method Detail

createSocketInitializer

protected SocketInitializer createSocketInitializer()
Create a socket initializer for this connection handler.

Specified by:
createSocketInitializer in class AbstractClientConnectionHandler
Returns:
a SocketInitializer instance.
See Also:
AbstractClientConnectionHandler.createSocketInitializer()

init

public void init()
          throws Exception
Initialize the connection.

Throws:
Exception - if an error is raised while initializing the connection.

initSocketClient

public void initSocketClient()
                      throws Exception
Initialize the underlying socket connection of this connection handler.

Throws:
Exception - if an error is raised during initialization.
See Also:
ClientConnectionHandler.initSocketClient()

close

public void close()
Close and cleanup this connection handler.

See Also:
ClientConnectionHandler.close()


Copyright © 2005-2010 JPPF Team.