Package org.basex.http
Class HTTPContext
- java.lang.Object
-
- org.basex.http.HTTPContext
-
public final class HTTPContext extends Object
Global HTTP context information.- Author:
- BaseX Team 2005-23, BSD License, Christian Gruen
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the database context.Contextcontext()Returns the database context.IOExceptionexception()Returns an exception that was caught during the initialization of the database server.static HTTPContextget()Returns the singleton instance.Contextinit(javax.servlet.ServletContext sc)Initializes the HTTP context, based on the initial servlet context.voidinit(StaticOptions sopts)Initializes the HTTP context with static options.
-
-
-
Method Detail
-
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.
-
-