gr.uoa.di.madgik.grs.utils
Class Locators

java.lang.Object
  extended by gr.uoa.di.madgik.grs.utils.Locators

public class Locators
extends java.lang.Object

Locator utilities

Author:
gerasimos.farantatos

Method Summary
static boolean isGRS2Locator(java.net.URI locator)
           
static java.net.URI localToHTTP(java.net.URI locator)
           
static java.net.URI localToTCP(java.net.URI locator)
          Converts a local locator retrieved from a LocalWriterProxy to a TCP locator which can be used in order for a remote consumer to access the records of the producer's local IBuffer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

localToTCP

public static java.net.URI localToTCP(java.net.URI locator)
                               throws GRS2ProxyInvalidArgumentException,
                                      GRS2ProxyInvalidOperationException
Converts a local locator retrieved from a LocalWriterProxy to a TCP locator which can be used in order for a remote consumer to access the records of the producer's local IBuffer. It can be used to make the contents of a local IBuffer available to a remote consumer, without the producer knowing that its records should be accessed in any other way other than locallyA new TCPWriterProxy and IMirror are constructed internally, and the IMirror is bound to the local IBuffer in order for the mirroring process to start, as if the consumer had created a TCPWriterProxy in the first place.

The TCPConnectionManager must have been initialized before using this method

Parameters:
locator - The local locator, retrieved by the LocalWriterProxy of the consumer
Returns:
A TCP locator which can be used to access the contents of the local IBuffer remotely
Throws:
GRS2ProxyInvalidArgumentException - The supplied locator is malformed or not of the correct type
GRS2ProxyInvalidOperationException - The locator could not be constructed because a proxy operation has failed

localToHTTP

public static java.net.URI localToHTTP(java.net.URI locator)
                                throws GRS2ProxyInvalidArgumentException,
                                       GRS2ProxyInvalidOperationException
Throws:
GRS2ProxyInvalidArgumentException
GRS2ProxyInvalidOperationException

isGRS2Locator

public static boolean isGRS2Locator(java.net.URI locator)