gr.uoa.di.madgik.commons.channel.proxy.local
Class LocalChannelLocator

java.lang.Object
  extended by gr.uoa.di.madgik.commons.channel.proxy.local.LocalChannelLocator
All Implemented Interfaces:
IChannelLocator

public class LocalChannelLocator
extends java.lang.Object
implements IChannelLocator

Defines a local proxy locator capable of identifying a channel in the same address space as the one it was created in

Author:
gpapanikos

Nested Class Summary
 
Nested classes/interfaces inherited from interface gr.uoa.di.madgik.commons.channel.proxy.IChannelLocator
IChannelLocator.LocatorType
 
Constructor Summary
LocalChannelLocator()
          Instantiates a new local channel locator.
 
Method Summary
 void Decode(byte[] payload)
          Unmarshals a serialization as returned by the IChannelLocator.Encode() method
 byte[] Encode()
          Marshals the locator in a serialized form that can then be passed to IChannelLocator.Decode(byte[]) to create a new instance of the locator.
 boolean equals(java.lang.Object o)
           
 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
 int hashCode()
           
 void SetRegistryKey(ChannelRegistryKey RegistryKey)
          Sets the registry UUID the channel that this locator identifies has been assigned
 java.lang.String toString()
           
 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.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalChannelLocator

public LocalChannelLocator()
Instantiates a new local channel locator.

Method Detail

Decode

public void Decode(byte[] payload)
            throws java.lang.Exception
Description copied from interface: IChannelLocator
Unmarshals a serialization as returned by the IChannelLocator.Encode() method

Specified by:
Decode in interface IChannelLocator
Parameters:
payload - The locator serialization
Throws:
java.lang.Exception - The deserialization could not be performed

Encode

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

Specified by:
Encode in interface IChannelLocator
Returns:
The serialized form of the locator
Throws:
java.lang.Exception - The serialization could not be performed

GetLocatorType

public IChannelLocator.LocatorType GetLocatorType()
Description copied from interface: IChannelLocator
Retrieves the Locator Type of the proxy locator

Specified by:
GetLocatorType in interface IChannelLocator
Returns:
The Locator type

GetRegistryKey

public ChannelRegistryKey GetRegistryKey()
Description copied from interface: IChannelLocator
Retrieves the registry UUID the channel that this locator identifies has been assigned

Specified by:
GetRegistryKey in interface IChannelLocator
Returns:
The registry UUID of the identified channel

SetRegistryKey

public void SetRegistryKey(ChannelRegistryKey RegistryKey)
Description copied from interface: IChannelLocator
Sets the registry UUID the channel that this locator identifies has been assigned

Specified by:
SetRegistryKey in interface IChannelLocator
Parameters:
RegistryKey - The registry UUID of the identified channel

ToURI

public java.net.URI ToURI()
                   throws java.lang.Exception
Description copied from interface: IChannelLocator
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.

Specified by:
ToURI in interface IChannelLocator
Returns:
The serialized form of the locator
Throws:
java.lang.Exception - The serialization could not be performed

FromURI

public void FromURI(java.net.URI locator)
             throws java.lang.Exception
Description copied from interface: IChannelLocator
Unmarshals a serialization as returned by the IChannelLocator#ToXML() method

Specified by:
FromURI in interface IChannelLocator
Throws:
java.lang.Exception - The deserialization could not be performed

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object