gr.uoa.di.madgik.grs.proxy.tcp
Class TCPStoreConnectionHandler
java.lang.Object
gr.uoa.di.madgik.grs.proxy.tcp.TCPStoreConnectionHandler
- All Implemented Interfaces:
- gr.uoa.di.madgik.commons.server.ITCPConnectionManagerEntry
public class TCPStoreConnectionHandler
- extends java.lang.Object
- implements gr.uoa.di.madgik.commons.server.ITCPConnectionManagerEntry
A connection handler that can be registered with the TCPConnectionManager
in order to
receive incoming TCP connection from clients. This entry is set to serve connections for the
gRS2 Store component
- Author:
- gpapanikos
Nested classes/interfaces inherited from interface gr.uoa.di.madgik.commons.server.ITCPConnectionManagerEntry |
gr.uoa.di.madgik.commons.server.ITCPConnectionManagerEntry.NamedEntry |
Method Summary |
gr.uoa.di.madgik.commons.server.ITCPConnectionManagerEntry.NamedEntry |
GetName()
|
void |
HandleConnection(java.net.Socket socket)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TCPStoreConnectionHandler
public TCPStoreConnectionHandler()
GetName
public gr.uoa.di.madgik.commons.server.ITCPConnectionManagerEntry.NamedEntry GetName()
-
The connection manager entry this handler can serve. The entry returned is marked
with ITCPConnectionManagerEntry.NamedEntry.gRS2Store
- Specified by:
GetName
in interface gr.uoa.di.madgik.commons.server.ITCPConnectionManagerEntry
- See Also:
ITCPConnectionManagerEntry.GetName()
HandleConnection
public void HandleConnection(java.net.Socket socket)
-
After a request of the correct type has reached TCPConnectionManager
, it is forwarded here
where the specific IBufferStore
is located. A new BufferStoreReader
is created
targeting the requesting IBufferStore
. A new TCPWriterProxy
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 TCPConnectionHandler
- Specified by:
HandleConnection
in interface gr.uoa.di.madgik.commons.server.ITCPConnectionManagerEntry
- See Also:
ITCPConnectionManagerEntry.HandleConnection(java.net.Socket)