|
|||||||||
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.HTTPWriterProxy
public class HTTPWriterProxy
This proxy is an implementation of the IWriterProxy
interface available to be
used by writers that want to make available their authored IBuffer
to readers
that can connect to an HTTP connection that can serve it regardless of their location
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 | |
---|---|
HTTPWriterProxy()
Creates a new instance |
Method Summary | |
---|---|
IMirror |
bind()
After setting the registry key, this method is used to retrieve the IMirror that can
serve the mirroring procedure for a reader |
java.lang.String |
getHostname()
The name of the host this HTTPWriterProxy is used. |
java.net.URI |
getLocator()
Retrieves a locator through which a reader proxy can contact the IMirror
serving the registered IBuffer |
int |
getPort()
The port the connection manager used. |
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. |
void |
setKey(java.lang.String key)
Sets the key that was assigned to the serving IBuffer through the buffer registry |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HTTPWriterProxy()
Method Detail |
---|
public java.lang.String getHostname()
HTTPWriterProxy
is used. The hostname is retrieved by
HTTPConnectionManager.GetConnectionManagerHostName()
public int getPort()
HTTPConnectionManager.GetConnectionManagerPort()
public void setKey(java.lang.String key) throws GRS2ProxyInvalidOperationException
IBuffer
through the buffer registry
setKey
in interface IWriterProxy
key
- the registry key
GRS2ProxyInvalidOperationException
- if the key is already set for this instanceIWriterProxy.setKey(java.lang.String)
public IMirror bind() throws GRS2ProxyInvalidOperationException
IMirror
that can
serve the mirroring procedure for a reader
An instance of the HTTPWriterMirror
that can serve in publishing the IBuffer
is created if not already
available and returned
bind
in interface IWriterProxy
IMirror
GRS2ProxyInvalidOperationException
- if the key i not set for this instanceIWriterProxy.bind()
public java.net.URI getLocator() throws GRS2ProxyInvalidOperationException, GRS2ProxyInvalidArgumentException
IMirror
serving the registered IBuffer
The created uri uses the scheme of IProxy.ProxyScheme
, the host name and port returned from
getHostname()
and getPort()
and sets the fragment to ProxyType#HTTP
.
An example of the created locator is grs2-proxy://foo.bar.gr:53361?key=272b934d-e796-4c30-944c-44ec2aec7eb7#HTTP
getLocator
in interface IWriterProxy
GRS2ProxyInvalidOperationException
- if the set key is null or empty
GRS2ProxyInvalidArgumentException
- if there was a problem creating the locator URIIWriterProxy.getLocator()
public static boolean isOfType(java.net.URI locator)
grs2-proxy://foo.bar.gr:53361?key=272b934d-e796-4c30-944c-44ec2aec7eb7#HTTP
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 |