Logo Search packages:      
Sourcecode: jetty version File versions  Download package

org::mortbay::http::HttpServer Class Reference

Inheritance diagram for org::mortbay::http::HttpServer:

org::mortbay::util::Container org::mortbay::util::LifeCycle org::mortbay::util::EventProvider org::mortbay::util::LifeCycle org::mortbay::util::EventProvider org::mortbay::jetty::Server org::jboss::jetty::Jetty org::mortbay::jetty::plus::Server

List of all members.


Detailed Description

HTTP Server. Services HTTP requests by maintaining a mapping between a collection of HttpListeners which generate requests and HttpContexts which contain collections of HttpHandlers.

This class is configured by API calls. The org.mortbay.jetty.Server class uses XML configuration files to configure instances of this class.

The HttpServer implements the BeanContext API so that membership events may be generated for HttpListeners, HttpContexts and WebApplications.

See also:
HttpContext

HttpHandler

HttpConnection

HttpListener

org.mortbay.jetty.Server

Version:
Id
HttpServer.java,v 1.70 2005/12/04 11:43:21 gregwilkins Exp
Author:
Greg Wilkins (gregw)

Definition at line 72 of file HttpServer.java.


Public Member Functions

HttpContext addContext (String virtualHost, String contextPathSpec)
HttpContext addContext (String contextPath)
HttpContext addContext (String virtualHost, HttpContext context)
HttpContext addContext (HttpContext context)
void addEventListener (EventListener listener) throws IllegalArgumentException
void addHostAlias (String virtualHost, String alias)
HttpListener addListener (HttpListener listener) throws IllegalArgumentException
HttpListener addListener (InetAddrPort address) throws IOException
HttpListener addListener (String address) throws IOException
UserRealm addRealm (UserRealm realm)
void destroy ()
HttpHandler findHandler (Class handlerClass, String uri, String[] vhosts)
Collection getComponents ()
int getConnections ()
long getConnectionsDurationAve ()
long getConnectionsDurationMax ()
long getConnectionsDurationMin ()
long getConnectionsDurationTotal ()
int getConnectionsOpen ()
int getConnectionsOpenMax ()
int getConnectionsOpenMin ()
int getConnectionsRequestsAve ()
int getConnectionsRequestsMax ()
int getConnectionsRequestsMin ()
HttpContext getContext (String contextPathSpec)
HttpContext getContext (String virtualHost, String contextPathSpec)
HttpContext getContext (String virtualHost, String contextPathSpec, int i)
synchronized HttpContext[] getContexts ()
int getErrors ()
Map getHostMap ()
HttpListener[] getListeners ()
UserRealm getRealm (String realmName)
RequestLog getRequestLog ()
int getRequests ()
int getRequestsActive ()
int getRequestsActiveMax ()
int getRequestsActiveMin ()
long getRequestsDurationAve ()
long getRequestsDurationMax ()
long getRequestsDurationMin ()
long getRequestsDurationTotal ()
int getRequestsPerGC ()
boolean getResolveRemoteHost ()
String[] getServerClasses ()
boolean getStatsOn ()
long getStatsOnMs ()
boolean getStopGracefully ()
String[] getSystemClasses ()
boolean getTrace ()
 HttpServer (boolean anonymous)
 HttpServer ()
synchronized boolean isFailed ()
synchronized boolean isStarted ()
void join () throws InterruptedException
boolean removeContext (HttpContext context) throws IllegalStateException
void removeEventListener (EventListener listener)
void removeListener (HttpListener listener)
UserRealm removeRealm (String realmName)
void save (String saveat) throws MalformedURLException, IOException
HttpContext service (HttpRequest request, HttpResponse response) throws IOException, HttpException
void setAnonymous (boolean anonymous)
synchronized void setContexts (HttpContext[] contexts)
void setListeners (HttpListener[] listeners)
synchronized void setRequestLog (RequestLog log)
void setRequestsPerGC (int requestsPerGC)
void setResolveRemoteHost (boolean resolveRemoteHost)
void setServerClasses (String[] classes)
void setStatsOn (boolean on)
void setStopGracefully (boolean graceful)
void setSystemClasses (String[] classes)
void setTrace (boolean trace)
synchronized final void start () throws Exception
void statsReset ()
synchronized final void stop () throws InterruptedException
synchronized void stop (boolean graceful) throws InterruptedException

Static Public Member Functions

static List getHttpServerList ()
static Collection getHttpServers ()
static void main (String[] args)

Protected Member Functions

void addComponent (Object o)
synchronized void doStart () throws Exception
synchronized void doStop () throws InterruptedException
synchronized boolean isStarting ()
synchronized boolean isStopping ()
HttpContext newHttpContext ()
void removeComponent (Object o)

Package Functions

synchronized void addMapping (String virtualHost, HttpContext context)
synchronized void addMappings (HttpContext context)
void log (HttpRequest request, HttpResponse response, int length)
synchronized boolean removeMapping (String virtualHost, HttpContext context)
synchronized boolean removeMappings (HttpContext context)
void statsCloseConnection (long duration, int requests)
void statsEndRequest (long duration, boolean ok)
void statsGotRequest ()
void statsOpenConnection ()

Private Member Functions

void readObject (java.io.ObjectInputStream in) throws IOException, ClassNotFoundException

Private Attributes

transient int _connections
transient long _connectionsDurationMax
transient long _connectionsDurationMin
transient long _connectionsDurationTotal
transient int _connectionsOpen
transient int _connectionsOpenMax
transient int _connectionsOpenMin
transient int _connectionsRequestsMax
transient int _connectionsRequestsMin
transient int _errors
transient int _gcRequests
transient boolean _gracefulStop
List _listeners = new ArrayList(3)
transient HttpContext _notFoundContext = null
HashMap _realmMap = new HashMap(3)
RequestLog _requestLog
transient int _requests
transient int _requestsActive
transient int _requestsActiveMax
transient int _requestsActiveMin
transient long _requestsDurationMax
transient long _requestsDurationMin
transient long _requestsDurationTotal
int _requestsPerGC
boolean _resolveRemoteHost = false
String[] _serverClasses
transient Object _statsLock = new Object[0]
boolean _statsOn = false
transient long _statsStartedAt = 0
String[] _systemClasses
boolean _trace = false
StringMap _virtualHostMap = new StringMap()

Static Private Attributes

static String[] __noVirtualHost = new String[1]
static Collection __roServers
static WeakHashMap __servers = new WeakHashMap()
static Log log = LogFactory.getLog(HttpServer.class)

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index