Class ReqState

java.lang.Object
opendap.servlet.ReqState

public class ReqState extends Object
User requests get cached here so that downstream code can access the details of the request information.
  • Constructor Details

    • ReqState

      public ReqState(jakarta.servlet.http.HttpServletRequest myRequest, jakarta.servlet.http.HttpServletResponse response, String dataPath, String encodedurl, String encodedquery)
    • ReqState

      public ReqState(AbstractServlet sv, jakarta.servlet.http.HttpServletRequest myRequest, jakarta.servlet.http.HttpServletResponse response, String rootPath2, String encodedurl, String encodedquery) throws opendap.dap.DAP2Exception
      Throws:
      opendap.dap.DAP2Exception
  • Method Details

    • getDataSet

      public String getDataSet()
    • getServerClassName

      public String getServerClassName()
    • getRequestSuffix

      public String getRequestSuffix()
    • getConstraintExpression

      public String getConstraintExpression()
    • getRequest

      public jakarta.servlet.http.HttpServletRequest getRequest()
    • getResponse

      public jakarta.servlet.http.HttpServletResponse getResponse()
    • getRootPath

      public String getRootPath()
    • getDDXCache

      public String getDDXCache(String realpath)
      This method will attempt to get the DDX cache directory name from the servlet's InitParameters. Failing this it will return the default DDX cache directory name.
      Parameters:
      realpath - path to this servlet's dir in webapps
      Returns:
      The name of the DDX cache directory(ending in '/').
    • setDefaultDDXCache

      public void setDefaultDDXCache(String cachedir)
      Sets the default DDX Cache directory name to the string cachedir. Note that if the servlet configuration conatins an Init Parameter DDXCache the default value will be ingnored.
      Parameters:
      cachedir -
    • getDDSCache

      public String getDDSCache(String realpath)
      This method will attempt to get the DDS cache directory name from the servlet's InitParameters. Failing this it will return the default DDS cache directory name.
      Parameters:
      realpath - path to this servlet's dir in webapps
      Returns:
      The name of the DDS cache directory(ending in '/').
    • setDefaultDDSCache

      public void setDefaultDDSCache(String cachedir)
      Sets the default DDS Cache directory name to the string cachedir. Note that if the servlet configuration conatins an Init Parameter DDSCache the default value will be ingnored.
      Parameters:
      cachedir -
    • getDASCache

      public String getDASCache(String realpath)
      This method will attempt to get the DAS cache directory name from the servlet's InitParameters. Failing this it will return the default DAS cache directory name.
      Parameters:
      realpath - path to this servlet's dir in webapps
      Returns:
      The name of the DAS cache directory (ending in '/')
    • setDefaultDASCache

      public void setDefaultDASCache(String cachedir)
      Sets the default DAS Cache directory name to the string cachedir. Note that if the servlet configuration conatins an Init Parameter DASCache the default value will be ignored.
      Parameters:
      cachedir -
    • getINFOCache

      public String getINFOCache(String realpath)
      This method will attempt to get the INFO cache directory name from the servlet's InitParameters. Failing this it will return the default INFO cache directory name.
      Parameters:
      realpath - path to this servlet's dir in webapps
      Returns:
      The name of the INFO cache directory(ending in '/').
    • setDefaultINFOCache

      public void setDefaultINFOCache(String cachedir)
      Sets the default INFO Cache directory name to the string cachedir. Note that if the servlet configuration conatins an Init Parameter INFOcache the default value will be ingnored.
      Parameters:
      cachedir -
    • getSchemaLocation

      public String getSchemaLocation()
      This method will attempt to get the Schema Location name from the servlet's InitParameters. Failing this it will return the default Schema Location.
      Returns:
      The Schema Location.
    • setDefaultSchemaLocation

      public void setDefaultSchemaLocation(String location)
      Sets the default Schema Location to the string location. Note that if the servlet configuration conatins an Init Parameter SchemaLocation the default value will be ingnored.
      Parameters:
      location -
    • processDodsURL

      protected void processDodsURL()
      ************************************************************************* Processes an incoming HttpServletRequest. Uses the content of the HttpServletRequestto create a ReqState object in that caches the values for:
      • dataSet The data set name.(Accessible using setDataSet() and getDataSet())
      • CE The constraint expression.(Accessible using setCE() and getCE())
      • requestSuffix The request suffix, used by OPeNDAP DAP2 to indicate the type of response desired by the client. (Accessible using setRequestSuffix() and getRequestSuffix())
      • isClientCompressed Does the requesting client accept a compressed response?
      • ServletConfig The ServletConfig object for this servlet.
      • ServerName The class name of this server.
      • RequestURL THe URL that that was used to call thye servlet.
      See Also:
    • getAcceptsCompressed

      public boolean getAcceptsCompressed()
      ************************************************************************* Evaluates the (private) request object to determine if the client that sent the request accepts compressed return documents.
      Returns:
      True is the client accpets a compressed return document. False otherwise.
    • getInitParameter

      public String getInitParameter(String name)
      ***********************************************************************
    • getDodsBlobURL_OLDANDBUSTED

      public String getDodsBlobURL_OLDANDBUSTED()
    • getUserObject

      public Object getUserObject()
    • setUserObject

      public void setUserObject(Object userObj)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getRequestURL

      public StringBuffer getRequestURL()