|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SK.gnome.dwarf.GenericService SK.gnome.dwarf.GenericServer SK.gnome.dwarf.thread.ThreadServer SK.gnome.dwarf.thread.MultiThreadServer SK.gnome.dwarf.tcpip.TCPIPServer SK.gnome.dwarf.http.HTTPServer
This is the main HTTP Server object.
This class provides a container for the HTTPHandler
, SessionManager
and Host
objects. The first one processes the HTTP requests, the second one
manages the HTTP sessions and the last one provides the virtual hosts.
An instance of the HTTPParameters
class may be added to the HTTPServer
in order to provide a custom set of runtime parameters.
Field Summary | |
protected java.util.Map |
hosts
Mapping between host identification strings and the Host objects. |
protected SessionManager |
sessionManager
The session manager. |
Fields inherited from class SK.gnome.dwarf.tcpip.TCPIPServer |
sslContext |
Fields inherited from class SK.gnome.dwarf.thread.MultiThreadServer |
counter |
Fields inherited from class SK.gnome.dwarf.thread.ThreadServer |
daemon, thread |
Fields inherited from class SK.gnome.dwarf.GenericService |
initParameters, parent |
Fields inherited from interface SK.gnome.dwarf.Service |
INITIALIZED, LOG_DEBUG, LOG_ERROR, LOG_FATAL, LOG_INFO, LOG_TRACE, LOG_WARN, LOG_XFER, SHUTDOWN, STARTED, STOPPED |
Constructor Summary | |
HTTPServer(java.lang.String name)
Creates a new HTTPServer. |
Method Summary | |
void |
addService(SK.gnome.dwarf.Service service)
Adds a service to the server. |
Host |
getHost(java.lang.String id)
Returns the Host object by the given host identification. |
protected int |
getRequestReadTimeout()
|
SessionManager |
getSessionManager()
Returns the session manager. |
void |
init(SK.gnome.dwarf.Server parent)
Initializes the server. |
Methods inherited from class SK.gnome.dwarf.tcpip.TCPIPServer |
createSSLServerSocket, createSSLServerSocket, createSSLSocket, enqueue, finish, getTCPRequest, isBlocking, isSSLConfigured, loop, report, setKeyPwd, setKeyStorePwd, setKeyStoreURL, setRegistrationQueueSize, setRequestClass, setSSLProtocol, shutdown, start |
Methods inherited from class SK.gnome.dwarf.thread.MultiThreadServer |
dequeue, enableThread, getHandlerTimeout, setHandlerClass, setHandlerTimeout, setMaxHandlers, setMinHandlers, setQueueSize, setSingleRequest, wakeUpHandlers |
Methods inherited from class SK.gnome.dwarf.thread.ThreadServer |
finish, run, setDaemon, stop |
Methods inherited from class SK.gnome.dwarf.GenericServer |
addService, getAuthenticator, getLogger, getParameters, getService, getServices, getServices, removeService |
Methods inherited from class SK.gnome.dwarf.GenericService |
getAuthFacility, getFullName, getInitParameter, getInitParameterNames, getLogFacility, getName, getPrincipal, getShutdownTimeout, getState, log, log, login, logout, setAuthFacility, setInitParameters, setLogFacility, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface SK.gnome.dwarf.Service |
getFullName, getName, getState, log, log, login, logout |
Field Detail |
protected java.util.Map hosts
Host
objects. The identification
string is either a hostname or an IP address. A single Host
instance can be mapped
by more then one string identification.
protected SessionManager sessionManager
Contains a reference to the SessionManager
object. The value is set by the
addService
method if a service being added to the server
implements this interface.
Constructor Detail |
public HTTPServer(java.lang.String name)
The setHandlerClass(HTTPHandler.class) is invoked to set the desired
handler class. That means the server will use HTTPHandler
objects for
handling the client connections by default.
Method Detail |
public void addService(SK.gnome.dwarf.Service service) throws SK.gnome.dwarf.ServiceException
If a service being added to the HTTPServer implements the SessionManager
interface, it is also stored in the sessionManager
field.
SK.gnome.dwarf.ServiceException
public void init(SK.gnome.dwarf.Server parent) throws SK.gnome.dwarf.ServiceException
If the server contains no Host
objects, a ServiceException is
thrown to indicate the misconfiguration.
If the getParameters() method returns null, a new HTTPParameters
instance is created and added to the server with the default parameter values.
SK.gnome.dwarf.ServiceException
public Host getHost(java.lang.String id)
The host identification can be either a hostname or an IP address. If no Host
instance can be found for the given hostname/address, the null value is returned.
id
- the host id
public SessionManager getSessionManager()
Returns the value of sessionManager
field.
protected int getRequestReadTimeout()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |