|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectelectric.webserver.WebServer
WebServer provides the functionality of a web server, including a servlet engine and HTTP routing capabilities.
Field Summary |
Fields inherited from interface electric.webserver.IWebServerConstants |
DEFAULT_TIMEOUT |
Fields inherited from interface electric.glue.IGLUELoggingConstants |
CLUSTER_DEBUG_EVENT, CLUSTER_EVENT, CONSOLE_DEBUG_EVENT, DEPLOY_EVENT, DETECTORS_EVENT, HTTP_EVENT, JMS_EVENT, REBINDING_EVENT, SECURITY_DEBUG_EVENT, SECURITY_DETAIL_EVENT, SERVLET_EVENT, SOAP_EVENT |
Fields inherited from interface electric.xml.IEXMLLoggingConstants |
MAPPING_EVENT, SCHEMA_EVENT |
Fields inherited from interface electric.util.log.ILoggingConstants |
CLASSLOADER_EVENT, COMMAND_EVENT, COMMENT_EVENT, CONFIG_EVENT, DEBUG_EVENT, ELECTRIC_LOGGING_PROPERTY, ERROR_EVENT, EXCEPTION_EVENT, FILE_EVENT, LICENSE_EVENT, RESOURCES_EVENT, SECURITY_EVENT, SHUTDOWN_EVENT, SOURCE_EVENT, SQL_EVENT, STARTUP_EVENT, WARNING_EVENT |
Fields inherited from interface electric.net.channel.IChannelStates |
ACTIVE, IDLE, PENDING, STATES |
Constructor Summary | |
WebServer(java.lang.String url)
Construct a web server associated with the specified URL but do not start processing HTTP requests until startup() is invoked. |
|
WebServer(java.lang.String url,
Context context)
|
|
WebServer(java.lang.String url,
ThreadPool threadPool,
int backlog,
Context context)
Construct a web server associated with the specified URL but do not start processing HTTP requests until I am sent startup(). |
Method Summary | |
void |
addContext(java.lang.String path,
HTTPContext context)
Add the context, associating it with the specified path. |
void |
addContext(java.lang.String path,
HTTPContext context,
boolean startup)
Add the context, associating it with the specified path. |
void |
addWelcomeFile(java.lang.String filename)
|
HTTPContext[] |
getAllContexts()
Return all my contexts |
HTTPContext |
getContext(java.lang.String path)
Return the context associated with the specified path. |
static int |
getDefaultTimeout()
|
IMessageFactory |
getMessageFactory()
|
SocketServer |
getSocketServer()
Return socket server associated with this web server |
int |
getTimeout()
|
XURL |
getXURL()
Return my XURL. |
HTTPContext |
removeContext(java.lang.String path)
Remove the context associated with the specified path. |
boolean |
service(IChannel channel)
If the channel has pending HTTP input, service it and return true, otherwise return false. |
static void |
setDefaultTimeout(int defaultTimeout)
|
void |
setDocbase(java.lang.String docbase)
|
void |
setMessageFactory(IMessageFactory messageFactory)
Allow explicit control over the message factory being used. |
void |
setTimeout(int timeout)
|
void |
shutdown()
Stop processing incoming HTTP requests and send a destroy() message to all of my servlets. |
void |
startup()
Start processing incoming HTTP requests. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WebServer(java.lang.String url) throws java.io.IOException
url
- The URL to service.
java.io.IOException
- If an I/O exception occurs.public WebServer(java.lang.String url, Context context) throws java.io.IOException
url
- context
- public WebServer(java.lang.String url, ThreadPool threadPool, int backlog, Context context) throws java.io.IOException
url
- The URL to service.threadPool
- The thread pool to use.backlog
- The maximum number of pending connections.
java.io.IOException
- If an I/O exception occurs.Method Detail |
public boolean service(IChannel channel) throws java.io.IOException
service
in interface IChannelSink
channel
-
java.io.IOException
public XURL getXURL()
public void startup() throws java.io.IOException
java.io.IOException
public void shutdown() throws java.io.IOException
java.io.IOException
public void setDocbase(java.lang.String docbase)
docbase
- public void addWelcomeFile(java.lang.String filename)
filename
- public void addContext(java.lang.String path, HTTPContext context) throws javax.servlet.ServletException
path
- context
- The context.
javax.servlet.ServletException
- If the context could not be added.public void addContext(java.lang.String path, HTTPContext context, boolean startup) throws javax.servlet.ServletException
path
- context
- The context.startup
- start up context if true
javax.servlet.ServletException
- If the context could not be added.public HTTPContext removeContext(java.lang.String path)
path
- The path.public HTTPContext getContext(java.lang.String path)
path
- The path.public HTTPContext[] getAllContexts()
public void setTimeout(int timeout)
timeout
- public int getTimeout()
public static void setDefaultTimeout(int defaultTimeout)
defaultTimeout
- public static int getDefaultTimeout()
public SocketServer getSocketServer()
public IMessageFactory getMessageFactory()
public void setMessageFactory(IMessageFactory messageFactory)
messageFactory
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |