public abstract class AbstractJPPFClient extends Object implements ClientConnectionStatusListener, AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
protected org.jppf.utils.TypedProperties |
config
The JPPF configuration properties.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractJPPFClient(String uuid)
Initialize this client with a specified application UUID.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConnectionPoolListener(ConnectionPoolListener listener)
Add a listener to the list of listeners to this client.
|
void |
close()
Close this client and release all the resources it is using.
|
JPPFConnectionPool |
findConnectionPool(int poolId)
Find the connection pool with the specified id.
|
ConnectionPool<?> |
findConnectionPool(int priority,
int poolId)
Find the connection pool with the specified priority and id.
|
JPPFConnectionPool |
findConnectionPool(String name)
Find the connection pool with the specified id.
|
List<JPPFConnectionPool> |
findConnectionPools(ConnectionPoolFilter<JPPFConnectionPool> filter)
Find the connection pools that pass the specified filter.
|
List<JPPFConnectionPool> |
findConnectionPools(JPPFClientConnectionStatus... statuses)
Find the connection pools that have a least one connection matching one of the specified statuses.
|
List<JPPFConnectionPool> |
findConnectionPools(String pattern)
Find the connection pools whose name matches the specified
regular expression. |
int |
getAllConnectionsCount()
Get count of all client connections handled by this JPPFClient.
|
JPPFClientConnection |
getClientConnection(int priority,
JPPFClientConnectionStatus... statuses)
Get a connection with the specified priority that matches one of the specified statuses.
|
org.jppf.utils.TypedProperties |
getConfig()
Get JPPF configuration properties.
|
JPPFConnectionPool |
getConnectionPool()
Get a pool with at least one
active connection and with the highest possible priority. |
List<JPPFConnectionPool> |
getConnectionPools()
Get a list of existing connection pools, ordered by descending priority.
|
List<JPPFConnectionPool> |
getConnectionPools(int priority)
Get a set of existing connection pools with the specified priority.
|
List<Integer> |
getPoolPriorities()
Get a list of all priorities for the currently existing pools, ordered by descending priority.
|
String |
getUuid()
Get the unique universal identifier for this JPPF client.
|
boolean |
isClosed()
Determine whether this JPPF client is closed.
|
void |
removeConnectionPoolListener(ConnectionPoolListener listener)
Remove a listener from the list of listeners to this client.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitstatusChangedprotected org.jppf.utils.TypedProperties config
protected AbstractJPPFClient(String uuid)
uuid - the unique identifier for this local client.public org.jppf.utils.TypedProperties getConfig()
TypedProperties instance. With JPPF configuration.public int getAllConnectionsCount()
JPPFClientConnection instances.public JPPFClientConnection getClientConnection(int priority, JPPFClientConnectionStatus... statuses)
priority - the priority of the connetion to find.statuses - a set of statuses, one of which must match the status of the connection to find.JPPFClientConnection that matches one of the specified statuses, or null if none could be found.public void close()
close in interface AutoCloseablepublic void addConnectionPoolListener(ConnectionPoolListener listener)
listener - the listener to add.public void removeConnectionPoolListener(ConnectionPoolListener listener)
listener - the listener to remove.public String getUuid()
public boolean isClosed()
true if this client is closed, false otherwise.public ConnectionPool<?> findConnectionPool(int priority, int poolId)
priority - the priority of the pool, helps speedup the search.poolId - the id of the pool to find.JPPFConnectionPool instance, or null if no pool witht he specified id could be found.public JPPFConnectionPool findConnectionPool(int poolId)
poolId - the id of the pool to find.JPPFConnectionPool instance, or null if no pool with the specified id could be found.public JPPFConnectionPool findConnectionPool(String name)
name - the name of the pool to find.JPPFConnectionPool instance, or null if no pool with the specified name could be found.public List<JPPFConnectionPool> findConnectionPools(JPPFClientConnectionStatus... statuses)
statuses - a set of statuses of which at least one must be matched by at least one connection in any of the returned pools.JPPFConnectionPool instances, possibly empty if none were found matching the specified statuses.
The pools in the list are ordered by descending priority.public List<JPPFConnectionPool> findConnectionPools(ConnectionPoolFilter<JPPFConnectionPool> filter)
filter - an implementation of the ConnectionPoolFilter interface. A null value is interpreted as no filter (all pools are accepted).JPPFConnectionPool instances, possibly empty if none passed the specified filter.
The pools in the list are ordered by descending priority.public List<JPPFConnectionPool> findConnectionPools(String pattern)
regular expression.pattern - the regular expression to match against.JPPFConnectionPool instances whose name match the input pattern, possibly empty but never null.public JPPFConnectionPool getConnectionPool()
active connection and with the highest possible priority.JPPFConnectionPool instance, or null if no pool was found with an active connection.public List<JPPFConnectionPool> getConnectionPools(int priority)
priority - the priority of the pool, helps speedup the search.JPPFConnectionPool instances, possibly empty but never null.public List<Integer> getPoolPriorities()
null.public List<JPPFConnectionPool> getConnectionPools()
JPPFConnectionPool instances, possibly empty but never null.Copyright © 2005-2019 JPPF Team.