public class HTTPWriterProxy extends Object implements IWriterProxy
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 locationIProxy.ProxyTypeProxyScheme, ProxyStoreScheme| Constructor and Description |
|---|
HTTPWriterProxy()
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
IMirror |
bind()
After setting the registry key, this method is used to retrieve the
IMirror that can
serve the mirroring procedure for a reader |
String |
getHostname()
The name of the host this
HTTPWriterProxy is used. |
URI |
getLocator()
|
int |
getPort()
The port the connection manager used.
|
static boolean |
isOfType(URI locator)
Checks if the provided URI is of a type that can be managed by an instance of this class.
|
void |
setKey(String key)
Sets the key that was assigned to the serving
IBuffer through the buffer registry |
public String getHostname()
HTTPWriterProxy is used. The hostname is retrieved by
HTTPConnectionManager.GetConnectionManagerHostName()public int getPort()
HTTPConnectionManager.GetConnectionManagerPort()public void setKey(String key) throws GRS2ProxyInvalidOperationException
IBuffer through the buffer registrysetKey in interface IWriterProxykey - the registry keyGRS2ProxyInvalidOperationException - 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 IWriterProxyIMirrorGRS2ProxyInvalidOperationException - if the key i not set for this instanceIWriterProxy.bind()public 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 IWriterProxyGRS2ProxyInvalidOperationException - if the set key is null or emptyGRS2ProxyInvalidArgumentException - if there was a problem creating the locator URIIWriterProxy.getLocator()public static boolean isOfType(URI locator)
grs2-proxy://foo.bar.gr:53361?key=272b934d-e796-4c30-944c-44ec2aec7eb7#HTTPlocator - the locator URI that needs to be checkedCopyright © 2014. All Rights Reserved.