Interface E3SubprocessPool

All Superinterfaces:
E3DynamicComponent

public interface E3SubprocessPool extends 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 Details

    • allocate

      E3Subprocess allocate() throws com.arbortext.e3.E3RequestException
      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

      E3Subprocess allocateImmediate() throws com.arbortext.e3.E3RequestException
      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

      void deallocate(E3Subprocess target)
      Returns a subprocess to the pool for use by another request.
      Parameters:
      target - subprocess to deallocate
    • getEnabled

      boolean getEnabled()
      Returns our 'enabled' flag
      Returns:
      True if enabled="yes" was specified in e3config.xml, False otherwise
    • getId

      String getId()
      Returns unique ID
      Specified by:
      getId in interface E3DynamicComponent
      Returns:
      String containing 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

      String getParameter(String name)
      Returns a subprocess-pool-specific parameter value
      Parameters:
      name -
      Returns:
      String value or null
    • getParameters

      Iterable<String> getParameters()
      Returns all subprocess-pool-specific parameter names
      Returns:
      List of String parameter names
    • getStatus

      void getStatus(PrintWriter writer)
      Formats information about our internal status for inclusing in the E3 status web page.
      Specified by:
      getStatus in interface E3DynamicComponent
      Parameters:
      writer - output stream to write to
    • getSubprocessEnvironment

      @Deprecated String 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 object
      descriptor - data from e3config.xml
      Throws:
      com.arbortext.e3.E3RequestException - upon error
    • queueFileDeletion

      void queueFileDeletion(File target)
      Queues a file or directory for deletion.
      Parameters:
      target - file or directory to delete
    • reinitialize

      void reinitialize() throws com.arbortext.e3.E3RequestException
      Instructs 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 returns True if this is the default pool.
      Parameters:
      request - Request to examine
      Returns:
      True if the request passes the tests and should execute in this pool, False otherwise.