AgentPool.BoundPool, AgentPool.UnboundPool
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,Agent> |
connections
The reserved agent, for each connection.
|
private boolean |
reset
Flag indicating this is STATE-RESET mode.
|
Constructor and Description |
---|
BoundPool(AppServerDefinition appDef,
boolean reset)
Build a new agent pool, for the specified appserver.
|
Modifier and Type | Method and Description |
---|---|
(package private) Agent |
acquireAgent(java.lang.String id,
java.lang.String code)
Get the agent associated with the given connection id.
|
(package private) java.lang.String |
newConnection()
Establish a new connection.
|
(package private) void |
releaseAgent(java.lang.String id,
Agent agent)
This is a no-op, as the agent is released only when the connection is terminated.
|
(package private) void |
terminateConnection(java.lang.String id,
boolean running)
Terminate the connection with the given ID and unbind the agent.
|
connect, deleteProcedure, disconnect, getActivate, getAppserver, getDeactivate, getExports, getFromMainPool, getName, getOperatingMode, getProcedure, getPropath, getShutdown, getStartup, getStartupParameter, hasProcedure, isEmpty, newPool, nextId, poolAgent, removeAgent, removeProcedure, saveProcedure, setExports, size, start, terminateAll, trimAgents
private final java.util.Map<java.lang.String,Agent> connections
private final boolean reset
BoundPool(AppServerDefinition appDef, boolean reset)
appDef
- The appserver definition.reset
- Flag indicating this is a STATE-RESET mode.Agent acquireAgent(java.lang.String id, java.lang.String code)
acquireAgent
in class AgentPool
id
- The connection ID.code
- The code of a persistent external procedure to which the agent is associated.
Not used for bound pools (as async requests are not possible).void releaseAgent(java.lang.String id, Agent agent)
releaseAgent
in class AgentPool
id
- The connection ID.agent
- The agent which needs to be released.java.lang.String newConnection() throws NumberedException
newConnection
in class AgentPool
NumberedException
- If the connection could not be established.void terminateConnection(java.lang.String id, boolean running)
terminateConnection
in class AgentPool
id
- The connection ID.running
- Flag indicating the Agent is already processing a command.