solar.service.directory
Class RemoteDirectoryListener

java.lang.Object
  |
  +--solar.service.directory.RemoteDirectoryListener
All Implemented Interfaces:
DirectoryListener, RpcConstants, java.io.Serializable

class RemoteDirectoryListener
extends java.lang.Object
implements DirectoryListener, java.io.Serializable, RpcConstants

A proxy class for remote name observer.

Version:
$Id: RemoteDirectoryListener.java,v 1.2 2003/10/05 18:50:56 glchen Exp $
Author:
Guanling Chen

Field Summary
protected  Address _address
           
protected  Id _id
           
protected  org.apache.log4j.Logger _log
           
protected  RpcService _rpc
           
protected  java.lang.String _sname
           
 
Fields inherited from interface solar.service.rpc.RpcConstants
RPC_BLOCK, RPC_HANDLER, RPC_REPLY, RPC_REQUEST, RPC_TIMEOUT
 
Constructor Summary
RemoteDirectoryListener(Id id, Address address)
           
 
Method Summary
private  java.lang.Object callRpc(Request req)
           
 Address getAddress()
           
 Id getId()
           
 void nameAdded(Name name, NameRecord rec)
          Handle event about the addition of a name.
 void nameMigrated(Name name, NameRecord oldrec, NameRecord newrec)
          Handle event about the migration of a name (named resource).
 void nameRemoved(Name name, NameRecord rec)
          Handle event about the removal of a name.
 void nameUpdated(Name oldname, NameRecord oldrec, Name newname, NameRecord newrec)
          Handle event about the change of a name.
 void setLogger(org.apache.log4j.Logger log)
           
 void setRpcService(java.lang.String sname, RpcService rpc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_log

protected transient org.apache.log4j.Logger _log

_sname

protected transient java.lang.String _sname

_rpc

protected transient RpcService _rpc

_id

protected Id _id

_address

protected Address _address
Constructor Detail

RemoteDirectoryListener

public RemoteDirectoryListener(Id id,
                               Address address)
Method Detail

setLogger

public void setLogger(org.apache.log4j.Logger log)

setRpcService

public void setRpcService(java.lang.String sname,
                          RpcService rpc)

getAddress

public Address getAddress()

getId

public Id getId()

nameAdded

public void nameAdded(Name name,
                      NameRecord rec)
Description copied from interface: DirectoryListener
Handle event about the addition of a name.

Specified by:
nameAdded in interface DirectoryListener

nameRemoved

public void nameRemoved(Name name,
                        NameRecord rec)
Description copied from interface: DirectoryListener
Handle event about the removal of a name.

Specified by:
nameRemoved in interface DirectoryListener

nameUpdated

public void nameUpdated(Name oldname,
                        NameRecord oldrec,
                        Name newname,
                        NameRecord newrec)
Description copied from interface: DirectoryListener
Handle event about the change of a name.

Specified by:
nameUpdated in interface DirectoryListener

nameMigrated

public void nameMigrated(Name name,
                         NameRecord oldrec,
                         NameRecord newrec)
Description copied from interface: DirectoryListener
Handle event about the migration of a name (named resource).

Specified by:
nameMigrated in interface DirectoryListener

callRpc

private java.lang.Object callRpc(Request req)
                          throws RpcException
RpcException