com.mortbay.HTTP
Interface HttpConfiguration

All Known Implementing Classes:
BaseConfiguration

public interface HttpConfiguration

Abstract HTTP Server Configuration. This interface defines the methods that the HttpServer calls to configure itself. It decouples the server from the configuration technology used. In most uses either a very simple configuration will be provided or the implementation of this interface will map the calls to a configuration file.


Field Summary
static java.lang.String HTTP1_0_KeepAlive
          Property name for controlling HTTP/1.0 Keep alive
static java.lang.String MaxListenerThreadIdleMs
          Property name for the maximum listener idle time
static java.lang.String MaxListenerThreads
          Property name for the maximum listener threads
static java.lang.String MinListenerThreads
          Property name for the minimum listener threads
static java.lang.String ResourceBase
          Property name for the getResource url base (eg.
static java.lang.String SessionMaxInactiveInterval
          Property name for the default session max idle time
static java.lang.String SetUserID
          Property name for User ID of the server (UNIX ONLY)
 
Method Summary
 InetAddrPort[] addresses()
          The IP addresses and ports the HTTP server listens on
 PathMap exceptionHandlersMap()
          The ExceptionHandlers.
 java.lang.Object getAttribute(java.lang.String name)
          Deprecated. Use getProperty
 java.lang.String getMimeType(java.lang.String file)
          Translate Mime type
 java.util.Properties getProperties()
          Returns the properties.
 java.lang.String getProperty(java.lang.String name)
          Returns an attribute of the server given the specified key name.
 PathMap httpHandlersMap()
          The HttpHandlers.
 java.lang.Class[] listenerClasses()
          The HttpListener classes.
 void log(java.lang.String message)
          Writes a message to the servlet log file.
 

Field Detail

SessionMaxInactiveInterval

public static final java.lang.String SessionMaxInactiveInterval
Property name for the default session max idle time

MinListenerThreads

public static final java.lang.String MinListenerThreads
Property name for the minimum listener threads

MaxListenerThreads

public static final java.lang.String MaxListenerThreads
Property name for the maximum listener threads

MaxListenerThreadIdleMs

public static final java.lang.String MaxListenerThreadIdleMs
Property name for the maximum listener idle time

ResourceBase

public static final java.lang.String ResourceBase
Property name for the getResource url base (eg. "file:"

SetUserID

public static final java.lang.String SetUserID
Property name for User ID of the server (UNIX ONLY)

HTTP1_0_KeepAlive

public static final java.lang.String HTTP1_0_KeepAlive
Property name for controlling HTTP/1.0 Keep alive
Method Detail

addresses

public InetAddrPort[] addresses()
The IP addresses and ports the HTTP server listens on

listenerClasses

public java.lang.Class[] listenerClasses()
The HttpListener classes. The classes derived from HttpListener (or HttpListener) used to listen to the corresponding address from addresses().

httpHandlersMap

public PathMap httpHandlersMap()
The HttpHandlers. The PathMap returned by this method maps request paths to arrays of HttpHandler instances. When an incoming request is received, its full requestPath is used to select the array of handlers from this pathMap and then each handler is called in turn until the request is handled. Simple configurations will normally map "/" to a single array of handlers. Handler instances can be placed in more than one array within this map.

exceptionHandlersMap

public PathMap exceptionHandlersMap()
The ExceptionHandlers. The PathMap returned by this method maps request paths to arrays of ExceptionHandler instances. When a HttpHandler throws an exception, the requests full requestPath is used to select an array of handlers from this pathMap and then each handler is called in turn until the exception is handled. Simple configurations will normally map "/" to a single array of handlers. Handler instances can be placed in more than one array within this map.

getMimeType

public java.lang.String getMimeType(java.lang.String file)
Translate Mime type

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Deprecated. Use getProperty

Returns an attribute of the server.

getProperty

public java.lang.String getProperty(java.lang.String name)
Returns an attribute of the server given the specified key name.

getProperties

public java.util.Properties getProperties()
Returns the properties. This may be modified and care must be taken in it's use. Modifications may or may not effect the currently running server (dynamic reconfiguration is under consideration).

log

public void log(java.lang.String message)
Writes a message to the servlet log file.