org.jppf.client
Class JPPFClientConnectionImpl

java.lang.Object
  extended by org.jppf.client.AbstractJPPFClientConnection
      extended by org.jppf.client.JPPFClientConnectionImpl
All Implemented Interfaces:
ClientConnectionStatusHandler, JPPFClientConnection

public class JPPFClientConnectionImpl
extends AbstractJPPFClientConnection

This class provides an API to submit execution requests and administration commands, and request server information data.
It has its own unique identifier, used by the nodes, to determine whether classes from the submitting application should be dynamically reloaded or not depending on whether the uuid has changed or not.

Author:
Laurent Cohen

Field Summary
 
Fields inherited from class org.jppf.client.AbstractJPPFClientConnection
appUuid, classServerPort, client, connectionUuid, credentials, delegate, host, isShutdown, job, listeners, name, port, priority, status, statusLock, taskServerConnection, totalTaskCount
 
Constructor Summary
JPPFClientConnectionImpl(JPPFClient client, String uuid, String name, JPPFConnectionInformation info)
          Initialize this client with a specified application UUID.
 
Method Summary
 List<JPPFJob> close()
          Shutdown this client and retrieve all pending executions for resubmission.
 void connect()
          Connect to the driver.
protected  SocketInitializer createSocketInitializer()
          Create a socket initializer.
 JMXDriverConnectionWrapper getJmxConnection()
          Get the object that provides access to the management functions of the driver.
 ReentrantLock getLock()
          Get the lock used to synchronize request submissions performed by mutliple threads.
 void init()
          Initialize this client connection.
 void initializeJmxConnection()
          Initialize the jmx connection using the specifed jmx server id.
 void submit(JPPFJob job)
          Deprecated. job submissions should be performed via the JPPFClient directly.
 
Methods inherited from class org.jppf.client.AbstractJPPFClientConnection
addClientConnectionStatusListener, configure, delegateStatusChanged, fireStatusChanged, getClient, getConnectionUuid, getCurrentJob, getLoadBalancer, getName, getPriority, getSerializationHelperClassName, getStatus, getTaskServerConnection, initCredentials, makeHelper, makeHelper, processStatusChanged, receiveResults, receiveResults, removeClientConnectionStatusListener, sendTasks, sendTasks, setCurrentJob, setPriority, setStatus, taskServerConnectionStatusChanged, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JPPFClientConnectionImpl

public JPPFClientConnectionImpl(JPPFClient client,
                                String uuid,
                                String name,
                                JPPFConnectionInformation info)
Initialize this client with a specified application UUID.

Parameters:
client - the JPPF client that owns this connection.
uuid - the unique identifier for this local client.
name - configuration name for this local client.
info - the connection properties for this connection.
Method Detail

init

public void init()
Initialize this client connection.

Specified by:
init in interface JPPFClientConnection
Specified by:
init in class AbstractJPPFClientConnection
See Also:
JPPFClientConnection.init()

connect

public void connect()
Connect to the driver.


initializeJmxConnection

public void initializeJmxConnection()
Initialize the jmx connection using the specifed jmx server id.


submit

public void submit(JPPFJob job)
            throws Exception
Deprecated. job submissions should be performed via the JPPFClient directly.

Submit the request to the server.

Parameters:
job - the job to execute remotely.
Throws:
Exception - if an error occurs while sending the request.
See Also:
JPPFClientConnection.submit(org.jppf.client.JPPFJob)

close

public List<JPPFJob> close()
Shutdown this client and retrieve all pending executions for resubmission.

Specified by:
close in interface JPPFClientConnection
Specified by:
close in class AbstractJPPFClientConnection
Returns:
a list of JPPFJob instances to resubmit.
See Also:
JPPFClientConnection.close()

createSocketInitializer

protected SocketInitializer createSocketInitializer()
Create a socket initializer.

Specified by:
createSocketInitializer in class AbstractJPPFClientConnection
Returns:
an instance of SocketInitializerImpl.
See Also:
AbstractJPPFClientConnection.createSocketInitializer()

getLock

public ReentrantLock getLock()
Get the lock used to synchronize request submissions performed by mutliple threads.

Returns:
a ReentrantLock instance.

getJmxConnection

public JMXDriverConnectionWrapper getJmxConnection()
Get the object that provides access to the management functions of the driver.

Returns:
a JMXConnectionWrapper instance.


Copyright © 2005-2010 JPPF Team.