org.jboss.msc.services.http
Class HttpServerService
java.lang.Object
org.jboss.msc.services.http.HttpServerService
- All Implemented Interfaces:
- Service<com.sun.net.httpserver.HttpServer>, Value<com.sun.net.httpserver.HttpServer>
public final class HttpServerService
- extends Object
- implements Service<com.sun.net.httpserver.HttpServer>
An example service using the embedded JDK HTTP server found in some Java distributions.
- Author:
- David M. Lloyd
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EXECUTOR_SETTER
public static final Value<Method> EXECUTOR_SETTER
executorInjector
public final Injector<Executor> executorInjector
HttpServerService
public HttpServerService()
getExecutor
public Executor getExecutor()
setExecutor
public void setExecutor(Executor executor)
getStopDelay
public int getStopDelay()
setStopDelay
public void setStopDelay(int stopDelay)
start
public void start(StartContext context)
throws StartException
- Description copied from interface:
Service
- Start the service. Do not return until the service has been fully started, unless an asynchronous service
start is performed. All injections will be complete before this method is called.
- Specified by:
start in interface Service<com.sun.net.httpserver.HttpServer>
- Parameters:
context - the context which can be used to trigger an asynchronous service start
- Throws:
StartException - if the service could not be started for some reason
stop
public void stop(StopContext context)
- Description copied from interface:
Service
- Stop the service. Do not return until the service has been fully stopped, unless an asynchronous service
stop is performed. All injections will remain intact until the service is fully stopped. This method should
not throw an exception.
- Specified by:
stop in interface Service<com.sun.net.httpserver.HttpServer>
- Parameters:
context - the context which can be used to trigger an asynchronous service stop
getBacklog
public int getBacklog()
setBacklog
public void setBacklog(int backlog)
getBindAddress
public InetSocketAddress getBindAddress()
setBindAddress
public void setBindAddress(InetSocketAddress bindAddress)
getValue
public com.sun.net.httpserver.HttpServer getValue()
throws IllegalStateException
- Description copied from interface:
Value
- Get the actual value.
- Specified by:
getValue in interface Value<com.sun.net.httpserver.HttpServer>
- Returns:
- the actual value
- Throws:
IllegalStateException - if the value is time-sensitive and the current state does not allow retrieval.
Copyright © 2010 JBoss, a division of Red Hat, Inc.