Package com.arbortext.e3
Interface E3SubprocessPool
- All Superinterfaces:
E3DynamicComponent
Describes an object that maintains a set of E3 Subprocess objects
and doles them out as needed, possibly making the requestor wait
until a service is available.
-
Method Summary
Modifier and TypeMethodDescriptionallocate()Obtains a subprocess from the request pool.Returns a subprocess from the request pool without waiting.voiddeallocate(E3Subprocess target) Returns a subprocess to the pool for use by another request.booleanReturns our 'enabled' flaggetId()Returns unique IDintReturns our maximum busy interval parameter.intReturns our maximum subprocess wait parameter.getParameter(String name) Returns a subprocess-pool-specific parameter valueReturns all subprocess-pool-specific parameter namesvoidgetStatus(PrintWriter writer) Formats information about our internal status for inclusing in the E3 status web page.Deprecated.No longer supported.voidinit(E3RequestContext context, com.arbortext.e3cf.E3SubprocessPoolDescriptor descriptor) Called during E3 servlet initializationvoidqueueFileDeletion(File target) Queues a file or directory for deletion.voidInstructs every allocated E3 subprocess to re-source its E3 applications.booleantestRequest(javax.servlet.http.HttpServletRequest request) Tests a request to see if it matches this pool's defined list of tests.Methods inherited from interface com.arbortext.e3.E3DynamicComponent
destroy
-
Method Details
-
allocate
Obtains a subprocess from the request pool. The calling thread may wait if no service is available; the duration of the wait is determined by the characteristics of the request pool.- Returns:
- E3Subprocess object or
null - Throws:
com.arbortext.e3.E3RequestException- on error
-
allocateImmediate
Returns a subprocess from the request pool without waiting. Returns null immediately if no subprocess is available.- Returns:
- E3Subprocess object or
null - Throws:
com.arbortext.e3.E3RequestException- on error
-
deallocate
Returns a subprocess to the pool for use by another request.- Parameters:
target- subprocess to deallocate
-
getEnabled
boolean getEnabled()Returns our 'enabled' flag- Returns:
Trueif enabled="yes" was specified in e3config.xml,Falseotherwise
-
getId
String getId()Returns unique ID- Specified by:
getIdin interfaceE3DynamicComponent- Returns:
Stringcontaining ID
-
getMaxBusyInterval
int getMaxBusyInterval()Returns our maximum busy interval parameter.- Returns:
- Maximum number of seconds a subprocess can take to execute a command or evaluate a function before we'll declare it hung and terminate it.
-
getMaxSubprocessWait
int getMaxSubprocessWait()Returns our maximum subprocess wait parameter.- Returns:
- Maximum number of seconds a request can take to wait for a sub-process available before we'll declare it no sub-process available.
-
getParameter
Returns a subprocess-pool-specific parameter value- Parameters:
name-- Returns:
Stringvalue or null
-
getParameters
Returns all subprocess-pool-specific parameter names- Returns:
- List of String parameter names
-
getStatus
Formats information about our internal status for inclusing in the E3 status web page.- Specified by:
getStatusin interfaceE3DynamicComponent- Parameters:
writer- output stream to write to
-
getSubprocessEnvironment
Deprecated.No longer supported.No longer supported.- Returns:
- 0-length
String.
-
init
void init(E3RequestContext context, com.arbortext.e3cf.E3SubprocessPoolDescriptor descriptor) throws com.arbortext.e3.E3RequestException Called during E3 servlet initialization- Parameters:
context- data/services objectdescriptor- data from e3config.xml- Throws:
com.arbortext.e3.E3RequestException- upon error
-
queueFileDeletion
Queues a file or directory for deletion.- Parameters:
target- file or directory to delete
-
reinitialize
void reinitialize() throws com.arbortext.e3.E3RequestExceptionInstructs every allocated E3 subprocess to re-source its E3 applications.- Throws:
com.arbortext.e3.E3RequestException- if E3 servlet is terminating
-
testRequest
boolean testRequest(javax.servlet.http.HttpServletRequest request) Tests a request to see if it matches this pool's defined list of tests. Skips test and returnsTrueif this is the default pool.- Parameters:
request- Request to examine- Returns:
Trueif the request passes the tests and should execute in this pool,Falseotherwise.
-