edu.nyu.cs.pdsg.discovery
Class Locator

java.lang.Object
  extended byedu.nyu.cs.pdsg.discovery.Locator
All Implemented Interfaces:
java.io.Serializable

public class Locator
extends java.lang.Object
implements java.io.Serializable

The Locator class encapsulates data about a service location.

See Also:
Serialized Form

Field Summary
private  ServiceDescriptor descriptor
           
private  java.net.InetSocketAddress server
           
private  Credentials serverCredentials
           
private  java.security.PublicKey serverIdentity
           
private  byte[] signature
           
 
Constructor Summary
Locator(ServiceDescriptor sd, java.net.InetSocketAddress _server, java.security.PublicKey _serverIdentity, Credentials _serverCredentials, byte[] _signature)
           
Locator(java.lang.String _name, java.net.InetSocketAddress _home, java.net.InetSocketAddress _server, java.security.PublicKey _serverIdentity, Credentials _serverCredentials, byte[] _signature)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 ServiceDescriptor getDescriptor()
           
 java.net.InetSocketAddress getHome()
           
 java.lang.String getName()
           
 java.net.InetSocketAddress getServer()
           
 Credentials getServerCredentials()
           
 java.security.PublicKey getServerIdentity()
           
 byte[] getSignature()
           
 int hashCode()
           
private  boolean nullUnequal(java.lang.Object o, java.lang.Object o2)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

descriptor

private ServiceDescriptor descriptor

server

private java.net.InetSocketAddress server

serverIdentity

private java.security.PublicKey serverIdentity

serverCredentials

private Credentials serverCredentials

signature

private byte[] signature
Constructor Detail

Locator

public Locator(java.lang.String _name,
               java.net.InetSocketAddress _home,
               java.net.InetSocketAddress _server,
               java.security.PublicKey _serverIdentity,
               Credentials _serverCredentials,
               byte[] _signature)
Parameters:
_name - the name of the service
_home - the home of the service (the owner/originator)
_server - a location of the service
_serverIdentity - the identity of the service location
_serverCredentials - the credentials of the service location
_signature - the signature of the service location

Locator

public Locator(ServiceDescriptor sd,
               java.net.InetSocketAddress _server,
               java.security.PublicKey _serverIdentity,
               Credentials _serverCredentials,
               byte[] _signature)
Parameters:
_server - a location of the service
_serverIdentity - the identity of the service location
_serverCredentials - the credentials of the service location
_signature - the signature of the service location
Method Detail

hashCode

public int hashCode()
Returns:
the hashCode of the Locator's service location -- getServer().hashCode()

equals

public boolean equals(java.lang.Object o)

nullUnequal

private boolean nullUnequal(java.lang.Object o,
                            java.lang.Object o2)

getName

public java.lang.String getName()
Returns:
the name of the service

getHome

public java.net.InetSocketAddress getHome()
Returns:
the service home

getDescriptor

public ServiceDescriptor getDescriptor()

getServer

public java.net.InetSocketAddress getServer()
Returns:
the service location

getServerIdentity

public java.security.PublicKey getServerIdentity()
Returns:
the identity of the service location

getServerCredentials

public Credentials getServerCredentials()
Returns:
the credentials of the service location

getSignature

public byte[] getSignature()
Returns:
the signature of the service location

toString

public java.lang.String toString()


Copyright (c) 2002-2003 New York University RLAB