|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nnsoft.shs.AbstractHttpServerConfiguration
public abstract class AbstractHttpServerConfiguration
An abstract RequestDispatcherConfiguration implementation that helps on dropping the boilerplate code of repeating the binder variable reference when binding.
Constructor Summary | |
---|---|
AbstractHttpServerConfiguration()
|
Method Summary | |
---|---|
protected void |
bindServerToHost(String host)
Configure the host name or the textual representation of its IP address the server has to be bound. |
protected void |
bindServerToPort(int port)
Configure the port number where binding the server. |
protected abstract void |
configure()
|
void |
configure(HttpServerConfigurator configurator)
|
protected RequestHandlerBuilder |
serve(String path)
Starts binding a request path, can be expressed using the web.xml grammar,
to a RequestHandler . |
protected void |
serveRequestsWithThreads(int threads)
Configure the number of threads that will serve the HTTP requests. |
protected void |
sessionsHaveMagAge(int sessionMaxAge)
Configure the maximum number of seconds of life of HTTP Sessions. |
protected DefaultResponseBuilder |
when(Response.Status status)
Allows defining the default response has to be shown when replying to clients with specified status. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractHttpServerConfiguration()
Method Detail |
---|
public final void configure(HttpServerConfigurator configurator)
configure
in interface HttpServerConfiguration
protected abstract void configure()
RequestDispatcherConfiguration#configure(HttpServerConfigurator)
protected final void bindServerToHost(String host)
host
- the host name or the textual representation of its IP address.HttpServerConfigurator.bindServerToHost(String)
protected final void bindServerToPort(int port)
port
- the port number where binding the server.HttpServerConfigurator.bindServerToPort(int)
protected final void serveRequestsWithThreads(int threads)
threads
- the number of threads that will serve the HTTP requests.HttpServerConfigurator.serveRequestsWithThreads(int)
protected final void sessionsHaveMagAge(int sessionMaxAge)
sessionMaxAge
- the maximum number of seconds of life of HTTP Sessions.HttpServerConfigurator.sessionsHaveMagAge(int)
protected final RequestHandlerBuilder serve(String path)
web.xml
grammar,
to a RequestHandler
.
path
- the path for handling calls.
RequestDispatcher
HttpServerConfigurator.serve(String)
protected final DefaultResponseBuilder when(Response.Status status)
status
- the status the server is replying to clients
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |