|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object kaos.core.csi.registration.RegistrationImpl
public class RegistrationImpl
This class implements the Registration interface, which efines the operations to register and deregister entities and entity hosting environments in the KAoS Directory Service and operations to modify the registration information. It also defines operations to register entitites in KAoS Domains and to maintain domain hierarchy. $Revision: 1.9 $
Method Summary | |
---|---|
void |
addChildToDomain(DomainDescription domain,
DomainDescription childDomain)
Add the childDomain as a child of the specified domain. |
KAoSAgentDescription |
createKAoSAgentDescription(java.lang.String guid,
java.lang.String nickname,
java.util.Vector domainNames,
java.lang.String transportName,
JasBean agentInitInfo)
Create an instance of the KAoSAgentDescription using the given parameters. |
void |
deregisterEntity(AgentDescription entityDescription)
Deregister the entity described by the given AgentDescription from the KAoS Directory Service. |
void |
deregisterEntityFromDomain(DomainDescription domain,
KAoSEntityDescription entityDesc)
Deregister the entity described by the given KAoSEntityDescription from the specified domain. |
void |
deregisterEntityHostingEnv(EntityHostEnvDescription eheDescription)
Deregister the entity hosting environment described by the given EntityHostEnvDescription from the KAoS Directory Service. |
static Registration |
getInstance()
Retrieve an instance of Registration. |
static Registration |
getInstance(java.lang.String transportName)
Retrieve an instance of Registration. |
protected void |
logMessage(java.lang.String msg,
java.lang.Exception e,
int logLevel)
|
protected void |
logMessage(java.lang.String msg,
int logLevel)
|
static void |
main(java.lang.String[] args)
|
void |
modifyEntityProperties(java.lang.String entityGUID,
java.util.List properties)
Modify properties of the entity identified by the given entityGUID. |
void |
registerEntity(AgentDescription entityDescription,
boolean guarded,
boolean replace)
Register the entity described by the given AgentDescription in the KAoS Directory Service. |
void |
registerEntityHostingEnv(EntityHostEnvDescription eheDescription,
boolean guarded,
boolean replace)
Register the entity hosting environment described by the given EntityHostEnvDescription in the KAoS Directory Service. |
void |
registerEntityInDomain(DomainDescription domain,
KAoSEntityDescription entityDesc)
Register the entity described by the given KAoSEntityDescription in the specified domain. |
void |
registerEntityWithProperties(AgentDescription entityDescription,
java.util.List properties,
boolean guarded,
boolean replace)
Register the entity described by the given AgentDescription and the List of Properties in the KAoS Directory Service. |
void |
removeChildFromDomain(DomainDescription domain,
DomainDescription childDomain)
Add the childDomain as a child of the specified domain. |
void |
setParentForDomain(DomainDescription domain,
DomainDescription parentDomain)
Set as a the parent the given parentDomain for the specified domain. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Registration getInstance(java.lang.String transportName) throws java.lang.Exception
transportName
- String specifying the name of the transport to use for communication with the KAoS Directory Service.
java.lang.Exception
public static Registration getInstance() throws java.lang.Exception
java.lang.Exception
public void registerEntity(AgentDescription entityDescription, boolean guarded, boolean replace) throws DirectoryFailure, AlreadyRegisteredException, GuardInstantiationException
registerEntity
in interface DirectoryRegistration
entityDescription
- AgentDescription is the JAS AgentDescription, whose subclasses describe the various
types of entities to be registered in KAoS: agents, guards, domains, containers.
Those entities are subjects to policies or potential subjects to policies,
or the entities are using KAoS for messaging.guarded
- boolean indicating the guarded/unguarded status for agents and containers.
If the entity is to be guarded, the implementation of this method will instantiate a guard,
or check if a guard already exists and proceed with the registration via the guard.replace
- boolean indicating whether to replace existing AgentDescription.
DirectoryFailure
- if the connection to the DS cannot be established.
AlreadyRegisteredException
- if the registering entity has been already registered in the DS
(if the replace = false and there is already registration for the specified AgentDescription).
GuardInstantiationException
public void registerEntityWithProperties(AgentDescription entityDescription, java.util.List properties, boolean guarded, boolean replace) throws DirectoryFailure, AlreadyRegisteredException, GuardInstantiationException
registerEntityWithProperties
in interface DirectoryRegistration
entityDescription
- AgentDescription is the JAS AgentDescription, whose subclasses describe the various
types of entities to be registered in KAoS: agents, guards, domains, containers.
Those entities are subjects to policies or potential subjects to policies,
or the entities are using KAoS for messaging.properties
- List of Property objects further describing the registering entity.guarded
- boolean indicating the guarded/unguarded status for agents and containers.
If the entity is to be guarded, the implementation of this method will instantiate a guard,
or check if a guard already exists and proceed with the registration via the guard.replace
- boolean indicating whether to replace existing AgentDescription.
DirectoryFailure
- if the connection to the DS cannot be established.
AlreadyRegisteredException
- if the registering entity has been already registered in the DS
(if the replace = false and there is already registration for the specified AgentDescription).
GuardInstantiationException
public void registerEntityHostingEnv(EntityHostEnvDescription eheDescription, boolean guarded, boolean replace) throws DirectoryFailure, AlreadyRegisteredException, GuardInstantiationException
registerEntityHostingEnv
in interface DirectoryRegistration
eheDescription
- EntityHostEnvDescription describes the hosting environment for agents and guards.guarded
- boolean indicating the guarded/unguarded status for the environment.
If the hosted environemnt is to be guarded, the implementation of
this method will instantiate a guard, or check if a guard already exists
and proceed with the registration via the guard.replace
- boolean indicating whether to replace existing EntityHostEnvDescription.
DirectoryFailure
- if the connection to the DS cannot be established.
AlreadyRegisteredException
- if the registering hosting environment has been already registered in the DS
(if the replace = false and there is already registration for the specified EntityHostEnvDescription).
GuardInstantiationException
public void modifyEntityProperties(java.lang.String entityGUID, java.util.List properties) throws DirectoryFailure, NotRegisteredException, ModificationException
modifyEntityProperties
in interface DirectoryRegistration
entityGUID
- String containing the entity GUID.properties
- List of Properties to be modified. Each Property contains the name, value, value description,
modification type (add/remove/set, etc), modification result.
Refer to the Property and ModificationResult interfaces for detailed description.
DirectoryFailure
- if the connection to the DS cannot be established.
NotRegisteredException
- if the entity whose properties are to be modified
has not been registered in the DS.
ModificationException
- if one or more property update failed.public void deregisterEntity(AgentDescription entityDescription) throws DirectoryFailure, NotRegisteredException
deregisterEntity
in interface DirectoryRegistration
entityDescription
- AgentDescription of the entity to be deregistered.
DirectoryFailure
- if the connection to the DS cannot be established.
NotRegisteredException
- if the entity to be deregistered has not been registered in the DS.public void deregisterEntityHostingEnv(EntityHostEnvDescription eheDescription) throws DirectoryFailure, NotRegisteredException
deregisterEntityHostingEnv
in interface DirectoryRegistration
entityDescription
- EntityHostEnvDescription of the entity hosting environment to be deregistered.
DirectoryFailure
- if the connection to the DS cannot be established.
NotRegisteredException
- if the entity to be deregistered has not been registered in the DS.public KAoSAgentDescription createKAoSAgentDescription(java.lang.String guid, java.lang.String nickname, java.util.Vector domainNames, java.lang.String transportName, JasBean agentInitInfo)
createKAoSAgentDescription
in interface DirectoryRegistration
guid
- String containing the globally unique identifier for the agent, or null. If null is passed, then
the Agent Naming Service will create the identifier.nickname
- String containing agent's nickname.domainNames
- Vector containing the names of the domains the agent will become a member of.transportName
- String specifying the name of the transport the agent wants to use, or null.
If null is specified, then the Locators will be empty.public void registerEntityInDomain(DomainDescription domain, KAoSEntityDescription entityDesc) throws DirectoryFailure, AlreadyRegisteredException
registerEntityInDomain
in interface DomainRegistration
domain
- DomainDescription describing the domain, in which to register the given entity.entityDesc
- KAoSEntityDescription describes the entity to be registered in the given domain.
DirectoryFailure
- if the connection to the DS cannot be established.
AlreadyRegisteredException
- if the registering entity has been already registered in the
the given domain.public void deregisterEntityFromDomain(DomainDescription domain, KAoSEntityDescription entityDesc) throws DirectoryFailure, NotRegisteredException
deregisterEntityFromDomain
in interface DomainRegistration
domain
- DomainDescription describing the domain, from which to deregister the given entity.entityDesc
- KAoSEntityDescription describes the entity to be deregistered from the given domain.
DirectoryFailure
- if the connection to the DS cannot be established.
NotRegisteredException
- if the deregistering entity has not been registered in the
the given domain.public void setParentForDomain(DomainDescription domain, DomainDescription parentDomain) throws DirectoryFailure, HasParentException
setParentForDomain
in interface DomainHierarchyConfiguration
domain
- DomainDescription describes the domain, whose parent is to be updated.parentDomain
- DomainDescription describes the parent domain.
DirectoryFailure
- if the connection to the DS cannot be established.
HasParentException
- if the specified domain has already a parent.public void addChildToDomain(DomainDescription domain, DomainDescription childDomain) throws DirectoryFailure, HasParentException
addChildToDomain
in interface DomainHierarchyConfiguration
domain
- DomainDescription describes the domain, to which the childDomain will be added.childDomain
- DomainDescription describes the child domain.
DirectoryFailure
- if the connection to the DS cannot be established.
HasParentException
- if the specified child domain has already a parent.public void removeChildFromDomain(DomainDescription domain, DomainDescription childDomain) throws DirectoryFailure, NotRegisteredException
removeChildFromDomain
in interface DomainHierarchyConfiguration
domain
- DomainDescription describes the domain, from which to remove the child domain.childDomain
- DomainDescription describes the child domain to be removed.
DirectoryFailure
- if the connection to the DS cannot be established.
NotRegisteredException
- if the specified domain does not have the specified child domain as a child.protected void logMessage(java.lang.String msg, int logLevel)
protected void logMessage(java.lang.String msg, java.lang.Exception e, int logLevel)
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |