util.rmi
Class AbstractRmiListener.ServiceReference

java.lang.Object
  extended by util.rmi.AbstractRmiListener.ServiceReference
Enclosing class:
AbstractRmiListener

private static final class AbstractRmiListener.ServiceReference
extends Object

Combines a service name, which should be a valid registry reference and a service class to a single Map key.


Field Summary
private  String bindname
          The binding name of the service.
private  Class<?> service
          The service class.
 
Constructor Summary
private AbstractRmiListener.ServiceReference(String boundas, Class<?> boundfor)
          Constructs a new ServiceReference which can be used as a key in a map.
 
Method Summary
 boolean equals(Object other)
          Two service references are equal if they have the same binding name and the same service class.
private  String getBindName()
          Returns the binding name of this service reference.
private  Class<?> getService()
          Returns the service class.
 int hashCode()
          Returns the hash key, which is identical to the has key of the binding name.
 String toString()
          For convenience, we retreive this as the binding name, followed by a colon, followed by the class name.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

bindname

private String bindname
The binding name of the service.


service

private Class<?> service
The service class.

Constructor Detail

AbstractRmiListener.ServiceReference

private AbstractRmiListener.ServiceReference(String boundas,
                                             Class<?> boundfor)
Constructs a new ServiceReference which can be used as a key in a map. No null-references allowed.

Method Detail

hashCode

public int hashCode()
Returns the hash key, which is identical to the has key of the binding name.

Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Two service references are equal if they have the same binding name and the same service class. This allows that remote objects that implement different services are still distinguishable.

Overrides:
equals in class Object

toString

public String toString()
For convenience, we retreive this as the binding name, followed by a colon, followed by the class name.

Overrides:
toString in class Object

getBindName

private String getBindName()
Returns the binding name of this service reference.


getService

private Class<?> getService()
Returns the service class.