|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.simpleframework.http.socket.service.RouterContainer
public class RouterContainer
The RouterContainer is used to route requests that
satisfy a WebSocket opening handshake to a specific service. Each
request intercepted by this Container implementation
is examined for opening handshake criteria as specified by RFC 6455,
and if it contains the required information it is router to a
specific service using a Router implementation. If the
request does not contain the required criteria it is handled by
an internal container delegate.
Router| Constructor Summary | |
|---|---|
RouterContainer(Container container,
Router router,
int threads)
Constructor for the RouterContainer object. |
|
RouterContainer(Container container,
Router router,
int threads,
long ping)
Constructor for the RouterContainer object. |
|
| Method Summary | |
|---|---|
void |
handle(Request req,
Response resp)
This method is used to create a dispatch a Session to
a specific service selected by a router. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RouterContainer(Container container,
Router router,
int threads)
throws IOException
RouterContainer object. This
requires a container to delegate traditional requests to and
a Router implementation which can be used to
select a service to dispatch a WebSocket session to.
container - this is the container to delegate torouter - this is the router used to select servicesthreads - this contains the number of threads to use
IOException
public RouterContainer(Container container,
Router router,
int threads,
long ping)
throws IOException
RouterContainer object. This
requires a container to delegate traditional requests to and
a Router implementation which can be used to
select a service to dispatch a WebSocket session to.
container - this is the container to delegate torouter - this is the router used to select servicesthreads - this contains the number of threads to useping - this is the frequency to send ping frames with
IOException| Method Detail |
|---|
public void handle(Request req,
Response resp)
Session to
a specific service selected by a router. If the session initiating
handshake fails for any reason this will close the underlying TCP
connection and send a HTTP 400 response back to the client. All
traditional requests that do not represent an WebSocket opening
handshake are dispatched to the internal container.
handle in interface Containerreq - the request that contains the client HTTP messageresp - the response used to deliver the server response
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||