|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jppf.client.AbstractJPPFClient
org.jppf.client.AbstractGenericClient
org.jppf.client.JPPFClient
public class JPPFClient
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jppf.client.AbstractGenericClient |
---|
AbstractGenericClient.ConnectionInitializer |
Field Summary |
---|
Fields inherited from class org.jppf.client.AbstractGenericClient |
---|
availableConnections, config, executor, loadBalancer, receiverThread |
Fields inherited from class org.jppf.client.AbstractJPPFClient |
---|
allConnections, credentials, listeners, pools, totalTaskCount, uuid |
Constructor Summary | |
---|---|
JPPFClient()
Initialize this client with an automatically generated application UUID. |
|
JPPFClient(ClientListener... listeners)
Initialize this client with an automatically generated application UUID. |
|
JPPFClient(String uuid)
Initialize this client with a specified application UUID. |
|
JPPFClient(String uuid,
ClientListener... listeners)
Initialize this client with the specified application UUID and new connection listeners. |
Method Summary | |
---|---|
void |
close()
Close this client and release all the resources it is using. |
protected AbstractJPPFClientConnection |
createConnection(String uuid,
String name,
JPPFConnectionInformation info)
Create a new driver connection based on the specified parameters. |
protected void |
initConfig(Object configuration)
Initialize this client's configuration. |
protected void |
initPools()
Read all client connection information from the configuration and initialize the connection pools accordingly. |
JPPFStats |
requestStatistics()
Deprecated. this method does not allow to chose which driver to get the statistics from. Use ((JPPFClientConnectionImpl) getConnection(java.lang.String)).getJmxConnection().statistics() instead. |
void |
statusChanged(ClientConnectionStatusEvent event)
Invoked when the status of a client connection has changed. |
List<JPPFTask> |
submit(JPPFJob job)
Submit a job execution request. |
Methods inherited from class org.jppf.client.AbstractGenericClient |
---|
addRequestClassLoader, getAvailableConnections, getConfig, getExecutor, getLoadBalancer, getRequestClassLoader, handleAvailableConnection, handleAvailableConnection2, hasAvailableConnection, isLocalExecutionEnabled, newConnection, removeRequestClassLoader, setLocalExecutionEnabled |
Methods inherited from class org.jppf.client.AbstractJPPFClient |
---|
addClientListener, connectionFailed, getAllConnectionNames, getAllConnections, getClientConnection, getClientConnection, getClientConnection, getClientConnection, getUuid, initCredentials, removeClientListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JPPFClient()
public JPPFClient(ClientListener... listeners)
listeners
- the listeners to add to this JPPF client to receive notifications of new connections.public JPPFClient(String uuid)
uuid
- the unique identifier for this local client.public JPPFClient(String uuid, ClientListener... listeners)
uuid
- the unique identifier for this local client.listeners
- the listeners to add to this JPPF client to receive notifications of new connections.Method Detail |
---|
protected void initConfig(Object configuration)
initConfig
in class AbstractGenericClient
configuration
- an object holding the JPPF configuration.protected AbstractJPPFClientConnection createConnection(String uuid, String name, JPPFConnectionInformation info)
createConnection
in class AbstractGenericClient
uuid
- the uuid of the JPPF client.name
- the name of the connection.info
- the driver connection information.
AbstractJPPFClientConnection
.public List<JPPFTask> submit(JPPFJob job) throws Exception
submit
in class AbstractJPPFClient
job
- the job to execute.
IllegalArgumentException
- if the job is null or empty.
Exception
- if an error occurs while sending the request.AbstractJPPFClient.submit(org.jppf.client.JPPFJob)
public JPPFStats requestStatistics() throws Exception
((JPPFClientConnectionImpl) getConnection(java.lang.String)).getJmxConnection().statistics()
instead.
JPPFStats
instance.
Exception
- if an error occurred while trying to get the server statistics.public void close()
close
in class AbstractGenericClient
protected void initPools()
initPools
in class AbstractGenericClient
public void statusChanged(ClientConnectionStatusEvent event)
statusChanged
in interface ClientConnectionStatusListener
statusChanged
in class AbstractGenericClient
event
- the event to notify of.ClientConnectionStatusListener.statusChanged(org.jppf.client.event.ClientConnectionStatusEvent)
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |