org.jppf.jca.work
Class JPPFJcaClientConnection

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

public class JPPFJcaClientConnection
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
JPPFJcaClientConnection(String uuid, String name, JPPFConnectionInformation info, JPPFJcaClient client)
          Initialize this client with a specified application UUID.
 
Method Summary
 List<JPPFJob> close()
          Shutdown this client and retrieve all pending executions for resubmission.
protected  SocketInitializer createSocketInitializer()
          Create a socket initializer.
 JPPFJcaClient getClient()
          Get the JPPF client that manages connections to the JPPF drivers.
 String getName()
          Get the name assigned tothis client connection.
protected  String getSerializationHelperClassName()
          Get the name of the serialization helper implementation class name to use.
 void init()
          Initialize this client connection.
 void sendTasks(ClassLoader cl, JPPFTaskBundle header, JPPFJob job)
          Send tasks to the server for execution.
 void sendTasks(JPPFTaskBundle header, JPPFJob job)
          Send tasks to the server for execution.
 void submit(JPPFJob job)
          Submit a JPPFJob for execution.
 String toString()
          Get a string representation of this client connection.
 
Methods inherited from class org.jppf.client.AbstractJPPFClientConnection
addClientConnectionStatusListener, configure, delegateStatusChanged, fireStatusChanged, getConnectionUuid, getCurrentJob, getLoadBalancer, getPriority, getStatus, getTaskServerConnection, initCredentials, makeHelper, makeHelper, processStatusChanged, receiveResults, receiveResults, removeClientConnectionStatusListener, sendTasks, setCurrentJob, setPriority, setStatus, taskServerConnectionStatusChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JPPFJcaClientConnection

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

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

init

public void init()
Description copied from class: AbstractJPPFClientConnection
Initialize this client connection.

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

sendTasks

public void sendTasks(ClassLoader cl,
                      JPPFTaskBundle header,
                      JPPFJob job)
               throws Exception
Send tasks to the server for execution.

Parameters:
cl - classloader used for serialization.
header - the task bundle to send to the driver.
job - the job to execute remotely.
Throws:
Exception - if an error occurs while sending the request.

sendTasks

public void sendTasks(JPPFTaskBundle header,
                      JPPFJob job)
               throws Exception
Send tasks to the server for execution.

Overrides:
sendTasks in class AbstractJPPFClientConnection
Parameters:
header - the task bundle to send to the driver.
job - the job to execute remotely.
Throws:
Exception - if an error occurs while sending the request.

submit

public void submit(JPPFJob job)
            throws Exception
Submit a JPPFJob for execution.

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

getSerializationHelperClassName

protected String getSerializationHelperClassName()
Get the name of the serialization helper implementation class name to use.

Overrides:
getSerializationHelperClassName in class AbstractJPPFClientConnection
Returns:
the fully qualified class name of a SerializationHelper implementation.
See Also:
AbstractJPPFClientConnection.getSerializationHelperClassName()

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()

getName

public String getName()
Get the name assigned tothis client connection.

Specified by:
getName in interface JPPFClientConnection
Overrides:
getName in class AbstractJPPFClientConnection
Returns:
the name as a string.
See Also:
JPPFClientConnection.getName()

toString

public String toString()
Get a string representation of this client connection.

Overrides:
toString in class AbstractJPPFClientConnection
Returns:
a string representing this connection.
See Also:
Object.toString()

createSocketInitializer

protected SocketInitializer createSocketInitializer()
Create a socket initializer.

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

getClient

public JPPFJcaClient getClient()
Get the JPPF client that manages connections to the JPPF drivers.

Overrides:
getClient in class AbstractJPPFClientConnection
Returns:
a JPPFJcaClient instance.


Copyright © 2005-2010 JPPF Team.