|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgr.uoa.di.madgik.grs.proxy.http.HTTPReaderProxy
gr.uoa.di.madgik.grs.proxy.http.HTTPStoreReaderProxy
public class HTTPStoreReaderProxy
This proxy extends the HTTPReaderProxy capabilities by adding an additional logic layer
on top of the original extended base capabilities. This additional logic layer serves to contact the
IBufferStore that can then create a locator capable of being managed by the underlying
HTTPReaderProxy instance.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface gr.uoa.di.madgik.grs.proxy.IProxy |
|---|
IProxy.ProxyType |
| Field Summary |
|---|
| Fields inherited from interface gr.uoa.di.madgik.grs.proxy.IProxy |
|---|
ProxyScheme, ProxyStoreScheme |
| Constructor Summary | |
|---|---|
HTTPStoreReaderProxy()
Creates a new instance |
|
| Method Summary | |
|---|---|
void |
fromLocator(java.net.URI locator)
Populates an instance of the IReaderProxy implementer with the information
provided through the specific locator URI |
IBuffer |
getBuffer()
After the proxy has been initialized, through this method, the IBuffer that
can be used by the reader to access the writer side IBuffer can be retrieved |
static boolean |
isOfType(java.net.URI locator)
Checks if the provided URI is of a type that can be managed by an instance of this class. |
| Methods inherited from class gr.uoa.di.madgik.grs.proxy.http.HTTPReaderProxy |
|---|
getHostname, getPort, overrideBufferCapacity |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HTTPStoreReaderProxy()
| Method Detail |
|---|
public void fromLocator(java.net.URI locator)
throws GRS2ProxyInvalidArgumentException,
GRS2ProxyInvalidOperationException
IReaderProxy implementer with the information
provided through the specific locator URI
This method parses the provided URI to retrieve the needed information. An example of the URI
this proxy can manage is grs2-proxy://foo.bar.gr:53361?key=272b934d-e796-4c30-944c-44ec2aec7eb7#HTTP
This method parses the provided URI locator that is expected to be in the form of the following example
http://foo.bar.gr:53361?key=272b934d-e796-4c30-944c-44ec2aec7eb7#HTTPStore. After the
parsing is completed, a connection is made to the provided host and port where it is expected that an instance
of the HTTPStoreConnectionHandler is listening. The key of the IBufferStore is send and the URI
locator is retrieved which is then forwarded to the underlying HTTPReaderProxy to take over any subsequent actions
fromLocator in interface IReaderProxyfromLocator in class HTTPReaderProxyGRS2ProxyInvalidArgumentException - If the provided locator is not of the expected type of the parsing procedure
does not provide the valid information needed
GRS2ProxyInvalidOperationException - if there was a problem initializing the underlying HTTPReaderProxyHTTPReaderProxy.fromLocator(java.net.URI)
public IBuffer getBuffer()
throws GRS2ProxyInvalidOperationException
IBuffer that
can be used by the reader to access the writer side IBuffer can be retrieved
Initializes a HTTPReaderMirror to handle the reader side mirroring procedure. The mirror is set with the
information available to the proxy, using the HTTPReaderMirror.setKey(String), HTTPReaderMirror.setPort(int)
and HTTPReaderMirror.setHostname(String) and then the HTTPReaderMirror.handle() method is invoked. The proxy
waits for the mirroring procedure to be initialized blocking using HTTPReaderMirror.waitInitialization() and if
there was any error during the initialization procedure, it is retrieved and thrown using HTTPReaderMirror.getInitializationError().
After this procedure is completed, the mirroring procedure continues in the HTTPReaderMirror thread of execution. The
returned IBuffer is the one available though HTTPReaderMirror.getBuffer() and is populated from HTTPReaderMirror
This method should only be used after the initialization step of the fromLocator(URI)
has been completed. After this is done, any call to this method simple forwards the request to he underlying
HTTPReaderProxy.getBuffer() method
getBuffer in interface IReaderProxygetBuffer in class HTTPReaderProxyIBuffer that is serving the reader
GRS2ProxyInvalidOperationException - if a call to this overriding method is done even after the
the store has been contacted and the underlying HTTPReaderProxy needs to be used.HTTPReaderProxy.getBuffer()public static boolean isOfType(java.net.URI locator)
http://foo.bar.gr:53361?key=272b934d-e796-4c30-944c-44ec2aec7eb7#HTTPStore
locator - the locator URI that needs to be checked
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||