|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.uoa.di.madgik.grs.proxy.local.LocalWriterProxy
public class LocalWriterProxy
This proxy is an implementation of the IWriterProxy
interface available to be
used by writers that want to make available their authored IBuffer
only to
readers that are collocated in the same JVM as they are
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 | |
---|---|
LocalWriterProxy()
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.net.URI |
getLocator()
Retrieves a locator through which a reader proxy can contact the IMirror
serving the registered IBuffer |
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 LocalWriterProxy()
Method Detail |
---|
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()
IMirror
that can
serve the mirroring procedure for a reader
Always returns null. This type of locator does not employ any IMirror
instance to
handle the synchronization between reader and writer as this is managed directly though
the underlying IBuffer
bind
in interface IWriterProxy
IMirror
IWriterProxy.bind()
public java.net.URI getLocator() throws GRS2ProxyInvalidOperationException, GRS2ProxyInvalidArgumentException
IMirror
serving the registered IBuffer
The created uri uses the scheme of IProxy.ProxyScheme
, "localhost" as the
host name and sets the fragment to IProxy.ProxyType.Local
.
An example of the created locator is
grs2-proxy://localhost?key=13bc140f-3013-4ce1-83b4-4d57d46863b0#Local
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://localhost?key=13bc140f-3013-4ce1-83b4-4d57d46863b0#Local
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 |