|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--solar.service.BaseService | +--solar.service.directory.DistDirectoryService
A distributed implementation of directory service.
Field Summary | |
protected Directory |
_directory
|
protected Address |
_laddr
|
protected java.util.Hashtable |
_listeners
|
protected org.apache.log4j.Logger |
_log
The logger for distributed directory service. |
protected RpcService |
_rpc
|
protected TransportService |
_transport
|
Fields inherited from class solar.service.BaseService |
_inited, _manager, _name |
Fields inherited from interface solar.service.directory.DirectoryConstants |
DIR_ADD_OBSERVER, DIR_ADVERTISE, DIR_ID, DIR_LOOKUP, DIR_NAME, DIR_NAME_ADDED, DIR_NAME_MIGRATED, DIR_NAME_REMOVED, DIR_NAME_UPDATED, DIR_NEWNAME, DIR_NEWREC, DIR_OBSERVER, DIR_OLDNAME, DIR_OLDREC, DIR_PATTERN, DIR_RECORD, DIR_REMOVE_OBSERVER, DIR_UNADVERTISE, DIR_UPDATE |
Fields inherited from interface solar.service.rpc.RpcConstants |
RPC_BLOCK, RPC_HANDLER, RPC_REPLY, RPC_REQUEST, RPC_TIMEOUT |
Constructor Summary | |
DistDirectoryService()
|
Method Summary | |
void |
addListener(Name pattern,
DirectoryListener listener)
Add a directory listener for the specified pattern. |
java.lang.Object |
advertise(Name name,
Id guid,
java.lang.Object obj)
Advertise a name to the name space, with an app-specific object. |
java.lang.Object |
handleRequest(Request request)
Processing a request. |
void |
initDependents()
Initialize dependent services here. |
java.util.List |
lookup(Name pattern)
Return a list of advertisement whose name matches the pattern. |
void |
removeListener(Name pattern,
DirectoryListener listener)
Remove a directory listener for the specified pattern. |
private java.util.List |
requestAll(Name name,
Request req)
|
java.lang.Object |
unadvertise(Name name,
Id guid)
Unadvertise a name from the name space. |
java.lang.Object |
update(Name oldname,
Id guid,
Name newname,
java.lang.Object obj)
Update a name advertisement in the name space. |
Methods inherited from class solar.service.BaseService |
assertInited, getDependentService, getName, getServiceManager, handleDispatchUnit, handleEvent, handleEvent, hasInited, init, init, setInited, setName, setServiceManager, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface solar.service.Service |
getName, getServiceManager, handleDispatchUnit, hasInited, init, setName, setServiceManager, start, stop |
Methods inherited from interface solar.api.EventHandler |
handleEvent |
Field Detail |
protected org.apache.log4j.Logger _log
protected Address _laddr
protected RpcService _rpc
protected TransportService _transport
protected Directory _directory
protected java.util.Hashtable _listeners
Constructor Detail |
public DistDirectoryService()
Method Detail |
public void initDependents() throws ServiceException
Service
initDependents
in interface Service
initDependents
in class BaseService
ServiceException
public java.lang.Object handleRequest(Request request) throws java.lang.Exception
RequestHandler
handleRequest
in interface RequestHandler
handleRequest
in class BaseService
java.lang.Exception
public void addListener(Name pattern, DirectoryListener listener) throws DirectoryException
DirectoryService
addListener
in interface DirectoryService
DirectoryException
public void removeListener(Name pattern, DirectoryListener listener) throws DirectoryException
DirectoryService
removeListener
in interface DirectoryService
DirectoryException
public java.util.List lookup(Name pattern) throws DirectoryException
DirectoryService
lookup
in interface DirectoryService
DirectoryException
public java.lang.Object advertise(Name name, Id guid, java.lang.Object obj) throws DirectoryException
DirectoryService
advertise
in interface DirectoryService
DirectoryException
public java.lang.Object unadvertise(Name name, Id guid) throws DirectoryException
DirectoryService
unadvertise
in interface DirectoryService
DirectoryException
public java.lang.Object update(Name oldname, Id guid, Name newname, java.lang.Object obj) throws DirectoryException
DirectoryService
update
in interface DirectoryService
DirectoryException
private java.util.List requestAll(Name name, Request req) throws DirectoryException
DirectoryException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |