nenok.net
Class DefaultLocator

java.lang.Object
  extended by nenok.net.Locator
      extended by nenok.net.DefaultLocator
All Implemented Interfaces:
Serializable

public class DefaultLocator
extends Locator

Default implementation of the Locator interface.

Version:
1.0
Author:
Marc Pouly
See Also:
Serialized Form

Constructor Summary
DefaultLocator(net.jini.id.Uuid pid, Envelope env)
          Constructor:
 
Method Summary
 void delete()
          Deletes the valuation that is referenced by this locator.
 boolean equals(Object o)
          Two locators are equal, if they point to the same object.
 Domain getDomain()
           
 net.jini.id.Uuid getEnvelopeID()
           
 String getType()
           
 int getWeight()
           
 int hashCode()
           
 Valuation retrieve()
           
 String toString()
           
 
Methods inherited from class nenok.net.Locator
getPID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultLocator

public DefaultLocator(net.jini.id.Uuid pid,
                      Envelope env)
Constructor:

Parameters:
pid - The identifier of the processor hosting the valuation.
env - The wrapper envelope of the valuation.
Method Detail

retrieve

public Valuation retrieve()
                   throws RemoteException
Specified by:
retrieve in class Locator
Returns:
Retrieves the referenced valuation from the processor.
Throws:
RemoteException - Exception caused when trying to access processors.
See Also:
Locator.retrieve()

delete

public void delete()
            throws RemoteException
Description copied from class: Locator
Deletes the valuation that is referenced by this locator.

Specified by:
delete in class Locator
Throws:
RemoteException - Exception caused when trying to access processors.
See Also:
Locator.delete()

getDomain

public Domain getDomain()
Specified by:
getDomain in class Locator
Returns:
The domain of the referenced valuation.
See Also:
Locator.getDomain()

getWeight

public int getWeight()
Specified by:
getWeight in class Locator
Returns:
The weight of the referenced valuation.

getType

public String getType()
Specified by:
getType in class Locator
Returns:
The type (class name) of the referenced valuation.
See Also:
Locator.getType()

getEnvelopeID

public net.jini.id.Uuid getEnvelopeID()
Returns:
The identifier of the envelope that wraps the referenced valuation.

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

equals

public boolean equals(Object o)
Two locators are equal, if they point to the same object.

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)