public class HTTPConnectionHandler extends Object implements gr.uoa.di.madgik.commons.server.http.IHTTPConnectionManagerEntry
HTTPConnectionManager in order to receive incoming HTTP connection from
clients. This entry is set to serve connections for the gRS2 component| Constructor and Description |
|---|
HTTPConnectionHandler() |
| Modifier and Type | Method and Description |
|---|---|
gr.uoa.di.madgik.commons.server.http.IHTTPConnectionManagerEntry.NamedEntry |
GetName() |
void |
HandleConnection(Socket socket,
String request,
BufferedOutputStream out,
String key) |
public gr.uoa.di.madgik.commons.server.http.IHTTPConnectionManagerEntry.NamedEntry GetName()
The connection manager entry this handler can serve. The entry returned
is marked with
gr.uoa.di.madgik.commons.server.IHTTPConnectionManagerEntry.NamedEntry#gRS2
GetName in interface gr.uoa.di.madgik.commons.server.http.IHTTPConnectionManagerEntrygr.uoa.di.madgik.commons.server.IHTTPConnectionManagerEntry#GetName()public void HandleConnection(Socket socket, String request, BufferedOutputStream out, String key)
After a request of the correct type has reached
HTTPConnectionManager, it is forwarded here where the specific
IBuffer and its serving IMirror is located. The request
is forwarded to the IMirror and the operation is completed in
this thread of execution. In the IMirror thread of execution, the
mirroring protocol is initiated and served.
The IMirror that is expected by this handler is one that manages
HTTP connections, the HTTPWriterMirror over which the
HTTPWriterMirror#setSocket(Socket) and
HTTPWriterMirror.setKey(String) is set before a call to
HTTPWriterMirror#handle() is invoked.
If the state of the HTTPWriterMirror thread is not
Thread.State.NEWm then the connection is discarded as there is already a
mirroring process in progress
HandleConnection in interface gr.uoa.di.madgik.commons.server.http.IHTTPConnectionManagerEntrygr.uoa.di.madgik.commons.server.IHTTPConnectionManagerEntry#HandleConnection(java.net.Socket)Copyright © 2014. All Rights Reserved.