public class RemoteAppServerConnectionPool extends AppServerConnectionPool
In remote connection mode, the target request is executed immediately, and queued in a pool (which is done only in cases when the appserver connection is done from within the FWD server).
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
appserver
The target appserver name.
|
private boolean |
sessionFree
Flag indicating if the connection is in session-free mode.
|
private LegacyServiceWorker |
worker
The worker which will execute the requests.
|
initialized| Constructor and Description |
|---|
RemoteAppServerConnectionPool(java.lang.String appserver)
Configure this remote connection for the specified appserver.
|
RemoteAppServerConnectionPool(java.lang.String appserver,
boolean sessionFree)
Configure this remote connection for the specified appserver.
|
| Modifier and Type | Method and Description |
|---|---|
void |
broadcast(LegacyAppServerWork work)
Broadcast a task to all the workers.
|
boolean |
dispatch(java.lang.String connectionID,
LegacyAppServerWork work,
java.lang.String target)
Code to process appserver requests.
|
java.lang.String |
getAppserver()
Get the target appserver name.
|
void |
initialize()
Initialize the connection pool - no special code is required for remote connections.
|
protected boolean |
isSessionFree()
Check if the appserver connection must be in session-free mode.
|
int |
size()
Get the size of this pool.
|
void |
terminateWorkers()
Terminate the service workers.
|
getTimeout, getType, isInitialized, isWebService, nextSessionId, registerWorker, setWebServiceprivate final java.lang.String appserver
private final boolean sessionFree
private final LegacyServiceWorker worker
public RemoteAppServerConnectionPool(java.lang.String appserver)
appserver - The appserver name.public RemoteAppServerConnectionPool(java.lang.String appserver,
boolean sessionFree)
appserver - The appserver name.sessionFree - Flag indicating if session-free mode is used.public void initialize()
initialize in class AppServerConnectionPoolpublic boolean dispatch(java.lang.String connectionID,
LegacyAppServerWork work,
java.lang.String target)
In this mode, the request is processed immediately, on the same thread as the requester.
dispatch in class AppServerConnectionPoolconnectionID - When not-null, force to use the worker with the specified connection ID.work - The work to perform the request.target - The target path.true if the request was processed by a worker.public void broadcast(LegacyAppServerWork work)
broadcast in class AppServerConnectionPoolwork - The work to perform the request.public void terminateWorkers()
terminateWorkers in class AppServerConnectionPoolpublic int size()
size in class AppServerConnectionPool1.public java.lang.String getAppserver()
getAppserver in class AppServerConnectionPoolprotected boolean isSessionFree()
isSessionFree in class AppServerConnectionPool