public abstract class AbstractGenericClient extends AbstractJPPFClient implements org.jppf.queue.QueueListener
config| Constructor and Description |
|---|
AbstractGenericClient(String uuid,
org.jppf.utils.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.
|
void |
addDriverDiscovery(org.jppf.discovery.ClientDriverDiscovery discovery)
Add a custom driver discovery mechanism to those already registered, if any.
|
boolean |
cancelJob(String jobId)
Cancel the job with the specified id.
|
void |
close()
Close this client and release all the resources it is using.
|
org.jppf.load.balancer.persistence.LoadBalancerPersistenceManagement |
getLoadBalancerPersistenceManagement()
Get the object that manages the persisted states of the load-balancers.
|
boolean |
hasAvailableConnection()
Determine whether there is a client connection available for execution.
|
protected void |
init(org.jppf.utils.TypedProperties configuration)
Initialize this client with the specified configuration.
|
protected void |
initPools(org.jppf.utils.TypedProperties config)
Read all client connection information from the configuration and initialize
the connection pools accordingly.
|
boolean |
isLocalExecutionEnabled()
Determine whether local execution is enabled on this client.
|
boolean |
isSysoutEnabled()
Determine whether the client should print connection events to stdout.
|
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.
|
addConnectionPoolListener, findConnectionPool, findConnectionPool, findConnectionPool, findConnectionPools, findConnectionPools, findConnectionPools, getAllConnectionsCount, getClientConnection, getConfig, getConnectionPool, getConnectionPools, getConnectionPools, getPoolPriorities, getUuid, isClosed, removeConnectionPoolListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitstatusChangedpublic AbstractGenericClient(String uuid, org.jppf.utils.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(org.jppf.utils.TypedProperties configuration)
configuration - the configuration to use with this client.protected void initPools(org.jppf.utils.TypedProperties config)
AbstractJPPFClientconfig - the JPPF configuration properties.public void close()
AbstractJPPFClientclose in interface AutoCloseableclose in class AbstractJPPFClientpublic 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.public org.jppf.load.balancer.persistence.LoadBalancerPersistenceManagement getLoadBalancerPersistenceManagement()
LoadBalancerPersistenceManagement.public void addDriverDiscovery(org.jppf.discovery.ClientDriverDiscovery discovery)
discovery - the driver discovery to add.public boolean isSysoutEnabled()
true if the client should print ot the console, false otherwise.Copyright © 2005-2019 JPPF Team.