ProcessEnvironment (Tomcat API Documentation)
Keywords: org.apache.catalina.util.ProcessEnvironment class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.catalina.util
Class ProcessEnvironment

    java.lang.Object
      org.apache.catalina.util.ProcessEnvironment

Direct Known Subclasses:
  CGIProcessEnvironment

public class ProcessEnvironment
extends java.lang.Object

Encapsulates the Process environment and rules to derive that environment from the servlet container and request information.

Since:
  Tomcat 4.0
Version:
  $Id: ProcessEnvironment.java 939526 2010-04-30 00:39:28Z kkolinko $
Author:
  Martin Dengler [root@martindengler.com]

Field Summary
`protected java.lang.String` | `command` Deprecated. command to be invoked
`protected int` | `debug` Deprecated. the debugging detail level for this instance.
`protected java.util.Hashtable` | `env` Deprecated. derived process environment
`protected java.lang.String` | `pathInfo` Deprecated. pathInfo for the current request
`protected boolean` | `valid` Deprecated. whether or not this object is valid or not
`protected java.io.File` | `workingDirectory` Deprecated. process' desired working directory

Constructor Summary
`ProcessEnvironment(javax.servlet.http.HttpServletRequest req, javax.servlet.ServletContext context)` Deprecated. Creates a ProcessEnvironment and derives the necessary environment, working directory, command, etc.
`ProcessEnvironment(javax.servlet.http.HttpServletRequest req, javax.servlet.ServletContext context, int debug)` Deprecated. Creates a ProcessEnvironment and derives the necessary environment, working directory, command, etc.

Method Summary
`protected java.lang.String` | `blanksToString(java.lang.String couldBeBlank, java.lang.String subForBlanks)` Deprecated. Converts blank strings to another string
`protected boolean` | `deriveProcessEnvironment(javax.servlet.http.HttpServletRequest req)` Deprecated. Constructs the Process environment to be supplied to the invoked process.
`java.lang.String` | `getCommand()` Deprecated. Gets derived command string
`javax.servlet.ServletContext` | `getContext()` Deprecated.
`java.lang.String` | `getContextPath()` Deprecated.
`java.util.Hashtable` | `getEnvironment()` Deprecated. Gets process' environment
`java.lang.String` | `getServletPath()` Deprecated.
`java.lang.String` | `getWebAppRootDir()` Deprecated. Gets the root directory of the web application to which this process\ belongs
`java.io.File` | `getWorkingDirectory()` Deprecated. Gets this process' derived working directory
`boolean` | `isValid()` Deprecated. Gets validity status
`protected java.lang.String` | `nullsToBlanks(java.lang.String s)` Deprecated. Converts null strings to blank strings ("")
`protected java.lang.String` | `nullsToString(java.lang.String couldBeNull, java.lang.String subForNulls)` Deprecated. Converts null strings to another string
`protected java.lang.String` | `setCommand(java.lang.String command)` Deprecated. Sets the desired command string
`java.util.Hashtable` | `setEnvironment(java.util.Hashtable env)` Deprecated. Sets process' environment
`protected void` | `setupFromContext(javax.servlet.ServletContext context)` Deprecated. Uses the ServletContext to set some process variables
`protected void` | `setupFromRequest(javax.servlet.http.HttpServletRequest req)` Deprecated. Uses the HttpServletRequest to set most process variables
`java.lang.String` | `toString()` Deprecated. Print important process environment information in an easy-to-read HTML table

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### pathInfo

    protected java.lang.String pathInfo

  Deprecated.
  pathInfo for the current request

### env

    protected java.util.Hashtable env

  Deprecated.
  derived process environment

### command

    protected java.lang.String command

  Deprecated.
  command to be invoked

### valid

    protected boolean valid

  Deprecated.
  whether or not this object is valid or not

### debug

    protected int debug

  Deprecated.
  the debugging detail level for this instance.

### workingDirectory

    protected java.io.File workingDirectory

  Deprecated.
  process' desired working directory

Constructor Detail

### ProcessEnvironment

    public ProcessEnvironment(javax.servlet.http.HttpServletRequest req,
                              javax.servlet.ServletContext context)

  Deprecated.
  Creates a ProcessEnvironment and derives the necessary environment, working directory, command, etc.

Parameters:
  `req` - HttpServletRequest for information provided by the Servlet API
  `context` - ServletContext for information provided by the Servlet API

### ProcessEnvironment

    public ProcessEnvironment(javax.servlet.http.HttpServletRequest req,
                              javax.servlet.ServletContext context,
                              int debug)

  Deprecated.
  Creates a ProcessEnvironment and derives the necessary environment, working directory, command, etc.

Parameters:
  `req` - HttpServletRequest for information provided by the Servlet API
  `context` - ServletContext for information provided by the Servlet API
  `debug` - int debug level (0 == none, 4 == medium, 6 == lots)

Method Detail

### setupFromContext

    protected void setupFromContext(javax.servlet.ServletContext context)

  Deprecated.
  Uses the ServletContext to set some process variables

  Parameters:
    `context` - ServletContext for information provided by the Servlet API

### setupFromRequest

    protected void setupFromRequest(javax.servlet.http.HttpServletRequest req)

  Deprecated.
  Uses the HttpServletRequest to set most process variables

  Parameters:
    `req` - HttpServletRequest for information provided by the Servlet API

### toString

    public java.lang.String toString()

  Deprecated.
  Print important process environment information in an easy-to-read HTML table

  Returns:
    HTML string containing process environment info

### getCommand

    public java.lang.String getCommand()

  Deprecated.
  Gets derived command string

  Returns:
    command string

### setCommand

    protected java.lang.String setCommand(java.lang.String command)

  Deprecated.
  Sets the desired command string

  Parameters:
    `command` - String command as desired
  Returns:
    command string

### getWorkingDirectory

    public java.io.File getWorkingDirectory()

  Deprecated.
  Gets this process' derived working directory

  Returns:
    working directory

### getEnvironment

    public java.util.Hashtable getEnvironment()

  Deprecated.
  Gets process' environment

  Returns:
    process' environment

### setEnvironment

    public java.util.Hashtable setEnvironment(java.util.Hashtable env)

  Deprecated.
  Sets process' environment

  Parameters:
    `env` - process' environment
  Returns:
    Hashtable to which the process' environment was set

### isValid

    public boolean isValid()

  Deprecated.
  Gets validity status

  Returns:
    true if this environment is valid, false otherwise

### nullsToBlanks

    protected java.lang.String nullsToBlanks(java.lang.String s)

  Deprecated.
  Converts null strings to blank strings ("")

  Parameters:
    `s` - string to be converted if necessary
  Returns:
    a non-null string, either the original or the empty string ("") if the original was `null`

### nullsToString

    protected java.lang.String nullsToString(java.lang.String couldBeNull,
                                             java.lang.String subForNulls)

  Deprecated.
  Converts null strings to another string

  Parameters:
    `couldBeNull` - string to be converted if necessary
    `subForNulls` - string to return instead of a null string
  Returns:
    a non-null string, either the original or the substitute string if the original was `null`

### blanksToString

    protected java.lang.String blanksToString(java.lang.String couldBeBlank,
                                              java.lang.String subForBlanks)

  Deprecated.
  Converts blank strings to another string

  Parameters:
    `couldBeBlank` - string to be converted if necessary
    `subForBlanks` - string to return instead of a blank string
  Returns:
    a non-null string, either the original or the substitute string if the original was `null` or empty ("")

### deriveProcessEnvironment

    protected boolean deriveProcessEnvironment(javax.servlet.http.HttpServletRequest req)

  Deprecated.
  Constructs the Process environment to be supplied to the invoked process. Defines an environment no environment variables.

  Should be overriden by subclasses to perform useful setup.

  Parameters:
    `req` - request associated with the Process' invocation
  Returns:
    true if environment was set OK, false if there was a problem and no environment was set

### getWebAppRootDir

    public java.lang.String getWebAppRootDir()

  Deprecated.
  Gets the root directory of the web application to which this process\ belongs

  Returns:
    root directory

### getContextPath

    public java.lang.String getContextPath()

  Deprecated.

### getContext

    public javax.servlet.ServletContext getContext()

  Deprecated.

### getServletPath

    public java.lang.String getServletPath()

  Deprecated.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.