public abstract class AbstractGenericClient extends AbstractJPPFClient implements QueueListener
Constructor and Description |
---|
AbstractGenericClient(String uuid,
TypedProperties configuration,
ConnectionPoolListener... listeners)
Initialize this client with a specified application UUID.
|
Modifier and Type | Method and Description |
---|---|
void |
addClientQueueListener(ClientQueueListener listener)
Register the specified listener to receive client queue event notifications.
|
boolean |
cancelJob(String jobId)
Cancel the job with the specified id.
|
void |
close()
Close this client and release all the resources it is using.
|
TypedProperties |
getConfig()
Get JPPF configuration properties.
|
boolean |
hasAvailableConnection()
Determine whether there is a client connection available for execution.
|
protected void |
init(TypedProperties configuration)
Initialize this client with the specified configuration.
|
boolean |
isLocalExecutionEnabled()
Determine whether local execution is enabled on this client.
|
ClassLoader |
registerClassLoader(ClassLoader cl,
String uuid)
Register a class loader for the specified job uuid.
|
void |
removeClientQueueListener(ClientQueueListener listener)
Unregister the specified listener.
|
void |
setLocalExecutionEnabled(boolean localExecutionEnabled)
Specify whether local execution is enabled on this client.
|
addClientListener, addConnectionPoolListener, findConnectionPool, findConnectionPool, findConnectionPool, findConnectionPools, findConnectionPools, findConnectionPools, getAllConnectionNames, getAllConnections, getAllConnectionsCount, getClientConnection, getClientConnection, getClientConnection, getClientConnection, getConnectionPool, getConnectionPools, getConnectionPools, getPoolPriorities, getUuid, isClosed, removeClientListener, removeConnectionPoolListener, submitJob
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
statusChanged
public AbstractGenericClient(String uuid, TypedProperties configuration, ConnectionPoolListener... listeners)
uuid
- the unique identifier for this local client.configuration
- the object holding the JPPF configuration.listeners
- the listeners to add to this JPPF client to receive notifications of new connections.protected void init(TypedProperties configuration)
configuration
- the configuration to use with this client.public TypedProperties getConfig()
TypedProperties
instance. With JPPF configuration.public void close()
AbstractJPPFClient
close
in interface AutoCloseable
close
in class AbstractJPPFClient
public boolean isLocalExecutionEnabled()
true
if local execution is enabled, false
otherwise.public void setLocalExecutionEnabled(boolean localExecutionEnabled)
localExecutionEnabled
- true
to enable local execution, false
otherwisepublic boolean hasAvailableConnection()
public boolean cancelJob(String jobId) throws Exception
jobId
- the id of the job to cancel.true
when cancel was successful false
otherwise.Exception
- if any error occurs.DriverJobManagementMBean.cancelJob(java.lang.String)
public ClassLoader registerClassLoader(ClassLoader cl, String uuid)
cl
- the ClassLoader
instance to register.uuid
- the uuid of the job for which the class loader is registered.RegisteredClassLoader
instance.public void addClientQueueListener(ClientQueueListener listener)
listener
- the listener to register.public void removeClientQueueListener(ClientQueueListener listener)
listener
- the listener to unregister.Copyright © 2005-2016 JPPF Team.