kaos.core.service.directory
Class DSCoordinatorImpl

java.lang.Object
  extended by kaos.core.util.MethodCallRequestHandler
      extended by kaos.core.service.directory.DSCoordinatorImpl
All Implemented Interfaces:
KAoSObservable, DirectoryServiceCoordinator

public class DSCoordinatorImpl
extends MethodCallRequestHandler
implements DirectoryServiceCoordinator, KAoSObservable


Field Summary
static java.lang.String NICKNAME
           
 
Fields inherited from class kaos.core.util.MethodCallRequestHandler
_agentDescription, _locator, _logger, _mts, _nickName
 
Fields inherited from interface kaos.core.service.directory.DirectoryServiceCoordinator
DS_REGISTRATION_UPDATE, LOCATOR_NAME, REGISTRATION_TYPE
 
Constructor Summary
DSCoordinatorImpl()
          Creates a new instance of DirectoryServiceCoordinator
 
Method Summary
 void deregister(KAoSAgentDescription agentDesc)
           
 void deregisterObserver(java.lang.String updateType, java.lang.Object updateCondition, KAoSObserver observer)
          Deregister the given KAoSObserver for the given update type from the registry of observers associated with this KAoSObservable.
 KAoSAgentDescription getDirectoryService(java.lang.String dsName)
           
 java.util.List getDirectoryServices()
           
 void initialize(ServiceRoot sr)
           
static void main(java.lang.String[] args)
           
 void notify(java.lang.String updateType, java.lang.Object updateCondition, java.lang.Object update)
          Notify observers interested in the given updateType wiht the given update object.
protected  JasBean obtainEntityEnv()
           
 void register(KAoSAgentDescription agentDesc)
           
 void registerObserver(java.lang.String updateType, java.lang.Object updateCondition, KAoSObserver observer)
          Register the given KAoSObserver with this KAoSObservable for updates described by the updateType and updateConstraints.
 
Methods inherited from class kaos.core.util.MethodCallRequestHandler
bindToTransport, initialize, receiveMessage, satisfyRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NICKNAME

public static final java.lang.String NICKNAME
See Also:
Constant Field Values
Constructor Detail

DSCoordinatorImpl

public DSCoordinatorImpl()
Creates a new instance of DirectoryServiceCoordinator

Method Detail

initialize

public void initialize(ServiceRoot sr)
                throws java.lang.Exception
Throws:
java.lang.Exception

obtainEntityEnv

protected JasBean obtainEntityEnv()

register

public void register(KAoSAgentDescription agentDesc)
Specified by:
register in interface DirectoryServiceCoordinator

deregister

public void deregister(KAoSAgentDescription agentDesc)
Specified by:
deregister in interface DirectoryServiceCoordinator

getDirectoryServices

public java.util.List getDirectoryServices()
Specified by:
getDirectoryServices in interface DirectoryServiceCoordinator

getDirectoryService

public KAoSAgentDescription getDirectoryService(java.lang.String dsName)
                                         throws NotRegisteredException
Specified by:
getDirectoryService in interface DirectoryServiceCoordinator
Throws:
NotRegisteredException

registerObserver

public void registerObserver(java.lang.String updateType,
                             java.lang.Object updateCondition,
                             KAoSObserver observer)
Register the given KAoSObserver with this KAoSObservable for updates described by the updateType and updateConstraints.

Specified by:
registerObserver in interface KAoSObservable
Parameters:
updateType - String indicating type of update the KAoSObserver is interested in.
updateCondition - Object describing the conditions under which to send the update.
observer - KAoSObserver registering with for updates.

deregisterObserver

public void deregisterObserver(java.lang.String updateType,
                               java.lang.Object updateCondition,
                               KAoSObserver observer)
Deregister the given KAoSObserver for the given update type from the registry of observers associated with this KAoSObservable.

Specified by:
deregisterObserver in interface KAoSObservable
Parameters:
updateType - String indicating type of update the KAoSObserver is no longer interested in.
observer - KAoSObserver deregistering.

notify

public void notify(java.lang.String updateType,
                   java.lang.Object updateCondition,
                   java.lang.Object update)
Notify observers interested in the given updateType wiht the given update object.

Specified by:
notify in interface KAoSObservable
Parameters:
updateType - String describing the type of update to perform.
update - Object containing the update.

main

public static void main(java.lang.String[] args)