Class HTTPContext

java.lang.Object
org.basex.http.HTTPContext

public final class HTTPContext extends Object
Global HTTP context information.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Method Details

    • get

      public static HTTPContext get()
      Returns the singleton instance.
      Returns:
      instance
    • context

      public Context context()
      Returns the database context. Creates a new instance if not done so before.
      Returns:
      database context
    • init

      public void init(StaticOptions sopts)
      Initializes the HTTP context with static options.
      Parameters:
      sopts - static options
    • init

      public Context init(javax.servlet.ServletContext sc) throws IOException
      Initializes the HTTP context, based on the initial servlet context. Parses all context parameters and passes them on to the database context.
      Parameters:
      sc - servlet context
      Returns:
      database context
      Throws:
      IOException - I/O exception
    • exception

      public IOException exception()
      Returns an exception that was caught during the initialization of the database server.
      Returns:
      exception (can be null)
    • close

      public void close()
      Closes the database context.