public class LegacyJavaAppserverClient extends LegacyJavaAppserver
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
connectionID
The appserver connection ID for this client.
|
private AppServerConnectionPool |
pool
The pool of workers.
|
private long |
sessionID
The session ID associated with this client.
|
INPUT, INPUT_OUTPUT, OUTPUT, TYPE_BLOB, TYPE_CHARACTER, TYPE_CLOB, TYPE_DATASET, TYPE_DATASET_HANDLE, TYPE_DATE, TYPE_DATETIME, TYPE_DATETIMETZ, TYPE_DECIMAL, TYPE_HANDLE, TYPE_INT64, TYPE_INTEGER, TYPE_LOGICAL, TYPE_LONGCHAR, TYPE_MEMPTR, TYPE_RAW, TYPE_RECID, TYPE_ROWID, TYPE_TABLE_HANDLE, TYPE_UNKNOWN
Constructor and Description |
---|
LegacyJavaAppserverClient(AppServerConnectionPool pool)
Initialize this client with the given worker pool.
|
LegacyJavaAppserverClient(AppServerConnectionPool pool,
boolean normalizedExtent)
Initialize this client with the given worker pool.
|
Modifier and Type | Method and Description |
---|---|
boolean |
connect()
Execute the connection to the worker.
|
void |
deleteProcedure(handle h)
Delete the specified procedure handle.
|
void |
disconnect()
Disconnect this client.
|
protected boolean |
execute(java.util.function.Consumer<LegacyServiceWorker> work)
Send the given task to be executed by one of the workers in the
pool . |
private java.lang.String |
getTarget()
Get the target for the current web request.
|
boolean |
isInitialized()
Check if the
pool is initialized. |
handle |
runPersistentProcedure(java.lang.String procedureName,
LegacyJavaAppserverParameter... paramArray)
Run an external program persistent.
|
java.lang.String |
runProcedure(handle proxy,
java.lang.String procedure,
LegacyJavaAppserverParameter... paramArray)
Run the specified internal procedure in the given proxy external program.
|
addDataObject, addDataObject, addRelation, addTableMetaData, beginLogging, createDataGraph, createDataGraph, createDataObject, createDataObject, createGraphMetaData, createMemptr, createObjectMetaData, createObjectMetaData, endLogging, getArgumentModes, getArguments, getBytes, getChangedDataObjects, getChanges, getChangeSummary, getChildRows, getConnection, getDataGraphName, getDataObjects, getDataObjects, getDataObjects, getFieldCount, getFieldName, getFieldType, getGraphName, getGregorianCalendar, getGregorianCalendar, getJavaParameter, getMetaData, getNumTables, getNumTables, getOutputParameter, getOutputParameter, getTableFieldType, getTableMetaData, getTableMetaData, getTableMetaData, getTableName, getTableNames, isCreated, isDeleted, isMemptr, isTableField, postProcessArguments, selectRows, setDefaultTrackChanges, setFieldMetaData, setGregorianCalendar
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
blob, character, clob, dataset, datasetHandle, date, datetime, datetimetz, decimal, handle, input, inputOutput, int64, integer, logical, longchar, memptr, output, raw, recid, rowid, tableHandle, unknown
private final AppServerConnectionPool pool
private final long sessionID
private java.lang.String connectionID
public LegacyJavaAppserverClient(AppServerConnectionPool pool)
pool
- The pool of workers where tasks will be forwarded, to be executed on the remote appserver.public LegacyJavaAppserverClient(AppServerConnectionPool pool, boolean normalizedExtent)
pool
- The pool of workers where tasks will be forwarded, to be executed on the remote appserver.normalizedExtent
- The extent field mode.public boolean isInitialized()
pool
is initialized.public boolean connect()
true
if it connected.public void deleteProcedure(handle h) throws ConditionException, RuntimeAppserverError
h
- The procedure handle.ConditionException
- In case the remote call has thrown an condition (STOP, QUIT, ERROR).RuntimeAppserverError
- In case the remote call has thrown an unexpected error.public java.lang.String runProcedure(handle proxy, java.lang.String procedure, LegacyJavaAppserverParameter... paramArray) throws ConditionException, RuntimeAppserverError
proxy
- A proxy external program obtained via runPersistentProcedure(java.lang.String, com.goldencode.p2j.util.LegacyJavaAppserverParameter...)
.procedure
- The internal procedure name.paramArray
- The parameters.ConditionException
- In case the remote call has thrown an condition (STOP, QUIT, ERROR).RuntimeAppserverError
- In case the remote call has thrown an unexpected error.public handle runPersistentProcedure(java.lang.String procedureName, LegacyJavaAppserverParameter... paramArray) throws ConditionException, RuntimeAppserverError
procedureName
- The procedure name.paramArray
- The parameters.ConditionException
- In case the remote call has thrown an condition (STOP, QUIT, ERROR).RuntimeAppserverError
- In case the remote call has thrown an unexpected error.public void disconnect()
protected boolean execute(java.util.function.Consumer<LegacyServiceWorker> work)
pool
.work
- The work to be executed.java.lang.RuntimeException
- If the request was not posted to any worker or the time allowed to execute has elapsed.private java.lang.String getTarget()