gr.uoa.di.madgik.grs.proxy.http
Class HTTPStoreConnectionHandler
java.lang.Object
gr.uoa.di.madgik.grs.proxy.http.HTTPStoreConnectionHandler
- All Implemented Interfaces:
- gr.uoa.di.madgik.commons.server.http.IHTTPConnectionManagerEntry
public class HTTPStoreConnectionHandler
- extends java.lang.Object
- implements gr.uoa.di.madgik.commons.server.http.IHTTPConnectionManagerEntry
A connection handler that can be registered with the HTTPConnectionManager in order to
receive incoming HTTP connection from clients. This entry is set to serve connections for the
gRS2 Store component
- Author:
- Alex Antoniadis
| Nested classes/interfaces inherited from interface gr.uoa.di.madgik.commons.server.http.IHTTPConnectionManagerEntry |
gr.uoa.di.madgik.commons.server.http.IHTTPConnectionManagerEntry.NamedEntry |
|
Method Summary |
gr.uoa.di.madgik.commons.server.http.IHTTPConnectionManagerEntry.NamedEntry |
GetName()
|
void |
HandleConnection(java.net.Socket socket,
java.lang.String request,
java.io.BufferedOutputStream out,
java.lang.String key)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HTTPStoreConnectionHandler
public HTTPStoreConnectionHandler()
GetName
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 NamedEntry#gRS2Store
- Specified by:
GetName in interface gr.uoa.di.madgik.commons.server.http.IHTTPConnectionManagerEntry
- See Also:
gr.uoa.di.madgik.commons.server.IHTTPConnectionManagerEntry#GetName()
HandleConnection
public void HandleConnection(java.net.Socket socket,
java.lang.String request,
java.io.BufferedOutputStream out,
java.lang.String key)
-
After a request of the correct type has reached HTTPConnectionManager, it is forwarded here
where the specific IBufferStore is located. A new BufferStoreReader is created
targeting the requesting IBufferStore. A new HTTPWriterProxy instance is utilized by the
reader to create a new URI locator that is then send back to the requester to user and access the reader's
IBuffer. The populating thread of execution is managed by the BufferStoreReader.
The connection received is then closed as the actual mirroring procedure will then start after a request
that will be handled by the HTTPConnectionHandler
- Specified by:
HandleConnection in interface gr.uoa.di.madgik.commons.server.http.IHTTPConnectionManagerEntry
- See Also:
gr.uoa.di.madgik.commons.server.IHTTPConnectionManagerEntry#HandleConnection(java.net.Socket)