gr.uoa.di.madgik.commons.channel.proxy
Interface IChannelLocator

All Known Implementing Classes:
LocalChannelLocator, TCPChannelLocator

public interface IChannelLocator

Interface of Locators that can identify a channel. The scope of each locator depends on the capabilities of the proxy that creates them. Depending on the scope of the Proxy, different locators can be created.

Author:
gpapanikos

Nested Class Summary
static class IChannelLocator.LocatorType
          Defines the available locators that can be used by the framework
 
Method Summary
 void Decode(byte[] payload)
          Unmarshals a serialization as returned by the Encode() method
 byte[] Encode()
          Marshals the locator in a serialized form that can then be passed to Decode(byte[]) to create a new instance of the locator.
 void FromURI(java.net.URI locator)
          Unmarshals a serialization as returned by the IChannelLocator#ToXML() method
 IChannelLocator.LocatorType GetLocatorType()
          Retrieves the Locator Type of the proxy locator
 ChannelRegistryKey GetRegistryKey()
          Retrieves the registry UUID the channel that this locator identifies has been assigned
 void SetRegistryKey(ChannelRegistryKey RegistryKey)
          Sets the registry UUID the channel that this locator identifies has been assigned
 java.net.URI ToURI()
          Marshals the locator in a serialized human readable XML form that can then be passed to IChannelLocator#FromXML(String) to create a new instance of the locator.
 

Method Detail

GetLocatorType

IChannelLocator.LocatorType GetLocatorType()
Retrieves the Locator Type of the proxy locator

Returns:
The Locator type

GetRegistryKey

ChannelRegistryKey GetRegistryKey()
Retrieves the registry UUID the channel that this locator identifies has been assigned

Returns:
The registry UUID of the identified channel

SetRegistryKey

void SetRegistryKey(ChannelRegistryKey RegistryKey)
Sets the registry UUID the channel that this locator identifies has been assigned

Parameters:
RegistryKey - The registry UUID of the identified channel

ToURI

java.net.URI ToURI()
                   throws java.lang.Exception
Marshals the locator in a serialized human readable XML form that can then be passed to IChannelLocator#FromXML(String) to create a new instance of the locator.

Returns:
The serialized form of the locator
Throws:
java.lang.Exception - The serialization could not be performed

FromURI

void FromURI(java.net.URI locator)
             throws java.lang.Exception
Unmarshals a serialization as returned by the IChannelLocator#ToXML() method

Parameters:
xml - The locator serialization
Throws:
java.lang.Exception - The deserialization could not be performed

Encode

byte[] Encode()
              throws java.lang.Exception
Marshals the locator in a serialized form that can then be passed to Decode(byte[]) to create a new instance of the locator.

Returns:
The serialized form of the locator
Throws:
java.lang.Exception - The serialization could not be performed

Decode

void Decode(byte[] payload)
            throws java.lang.Exception
Unmarshals a serialization as returned by the Encode() method

Parameters:
payload - The locator serialization
Throws:
java.lang.Exception - The deserialization could not be performed