|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object kaos.core.csi.KAoSActorImpl
public class KAoSActorImpl
$Revision: 1.14 $
Field Summary | |
---|---|
protected boolean |
_autoCommit
|
protected Locator |
_lctr
|
protected static Logger |
_logger
|
protected java.util.List |
_propertiesToModify
|
protected boolean |
_registered
|
protected Registration |
_registration
|
protected java.util.Hashtable |
_transports
|
protected TransportSupport |
_transportSupport
|
Constructor Summary | |
---|---|
KAoSActorImpl(java.lang.String guid,
java.lang.String name,
java.util.Vector domainNames,
Transport transport)
Instantiates a new KAoS-aware agent using JAS services for transport, naming and agent directory. |
Method Summary | |
---|---|
void |
addCapability(AgentCapability capability)
Add an AgentCapability this KAoSActor offers. |
void |
addOntologicalType(java.lang.String type,
java.lang.String owlDesc)
Add an ontological type to the collection of types held by the KAoSActor. |
void |
addProperty(Property property,
java.lang.Object value)
Add the specified property, whose name and value are given to the collection of properties of this KAoSActor. |
void |
addPropertyValue(Property property,
java.lang.Object value)
Add the specified value to the list of values of the given property. |
void |
addTransport(Transport transport)
Add the specified Transport to the collection of available Transports. |
void |
commitPropertyValues()
Commit any property value changes that were not yet send to the Directory Service. |
boolean |
equals(java.lang.Object obj)
Two agents are equal if their respective hash codes are equal. |
KAoSAgentDescription |
getAgentDescription()
|
java.util.List |
getCapabilities()
Obtain the collection of AgentCapabilities of this KAoSActor. |
java.lang.String |
getConceptMappingName()
Get the name of the concept mapping between the entity system's ontological concepts and KAoS ontology. |
java.util.List |
getDomainNames()
Returns a List of String containing the names of domains the actor is registered in. |
java.util.Enumeration |
getEntityOntologicalTypeNames()
Obtain the collection of just names of ontological types of KAoS entity described by this KAoSActor. |
java.util.Map |
getEntityOntologicalTypes()
Obtain the collection of ontological types of this KAoSActor. |
java.lang.String |
getGUID()
Obtain the actor's globally unique identifier. |
java.lang.String |
getName()
Obtain the actor's name. |
java.util.Hashtable |
getProperties()
Returns a Hashtable containing a mapping of actor properties. |
Property |
getProperty(java.lang.String name)
Return the property, whose name is specified |
java.lang.Object |
getPropertyValue(Property property)
Return the value of the given property |
Transport |
getTransport(java.lang.String name)
Return the Transport, whose name is specified. |
java.util.List |
getTransports()
Return the List of valid Transports. |
int |
hashCode()
Determines the hash code for the KAoSActor. |
boolean |
isAutoPropertyValueCommit()
Indicates whether property value changes are automatically committed to the Directory Service (default = true). |
boolean |
isGuarded()
Obtain guarded/unguarded status of this KAoSActor. |
boolean |
isRegistered()
Obtain registered/unregistered status of this KAoSActor. |
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)
|
protected void |
printTransportMessage(TransportMessage tmsg)
|
void |
receiveMessage(java.io.Serializable messageContent,
KAoSActor sender)
Receive the specified message content from the given KAoSActor. |
void |
receiveMessage(TransportMessage tmsg)
Implements the receiveMessage method mandated by the MessageListener interface. |
boolean |
removeCapability(AgentCapability capability)
Remove the specified AgentCapability from the collection of this KAoSActor's capabilities. |
boolean |
removeOntologicalType(java.lang.String type)
Remove an ontological type from the collection of types held by the KAoSActor. |
void |
removeProperty(Property property)
Remove the specified property from the collection of properties of this KAoSActor. |
void |
removePropertyValue(Property property,
java.lang.Object value)
Remove the specified value from the list of values of the given property. |
void |
removeTransport(Transport transport)
Remove the specified Transport from the collection of actor's Transports. |
void |
sendMessage(java.io.Serializable messageContent,
KAoSActor receiver)
Send the specified message content to the given KAoSActor. |
void |
setAutoPropertyValueCommit(boolean autoCommit)
Set the auto property value commit flag to true or false. |
void |
setCapabilities(java.util.List capabilities)
Set the collection of AgentCapabilities of this KAoSActor. |
void |
setConceptMappingName(java.lang.String mappingName)
Set the name of the concept mapping between the entity system's ontological concepts and KAoS ontology. |
void |
setGUID(java.lang.String actorGUID)
Set the actor's globally unique identifier. |
void |
setName(java.lang.String name)
Set the actor's name. |
void |
setOntologicalTypes(java.util.Map types)
Set the ontological types of this KAoSActor. |
void |
setProperties(java.util.Hashtable properties)
Set a Hashtable containing a mapping of actor properties. |
void |
setPropertyValue(Property property,
java.lang.Object value)
Replace the specified value with the given value of the given property |
void |
setRegistered(boolean registered)
Set the registered/unregistered status of this KAoSActor. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Logger _logger
protected Registration _registration
protected TransportSupport _transportSupport
protected boolean _autoCommit
protected boolean _registered
protected java.util.Hashtable _transports
protected java.util.List _propertiesToModify
protected Locator _lctr
Constructor Detail |
---|
public KAoSActorImpl(java.lang.String guid, java.lang.String name, java.util.Vector domainNames, Transport transport) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public java.lang.String getConceptMappingName()
getConceptMappingName
in interface KAoSActor
public void setConceptMappingName(java.lang.String mappingName)
mappingName
- The name of the mapping to be used to translate ontological names from
the entity system to KAoS ontologies.public java.util.List getDomainNames()
getDomainNames
in interface KAoSActor
public java.lang.String getGUID()
getGUID
in interface KAoSActor
public void setGUID(java.lang.String actorGUID)
actorGUID
- String containing actor's globally unique identifier.public java.lang.String getName()
getName
in interface KAoSActor
public void setName(java.lang.String name)
name
- String containing the actor's name.public void addOntologicalType(java.lang.String type, java.lang.String owlDesc)
type
- String containing the name of ontological type of this actor.owlDesc
- String containing OWL description of the corresponding ontological type.public boolean removeOntologicalType(java.lang.String type)
type
- The name of the ontological type to be removed from the collection of ontological types.
public void setOntologicalTypes(java.util.Map types)
types
- Map containing type name -> OWL description mapping of ontological types
of the entity this description is associated with.public java.util.Map getEntityOntologicalTypes()
getEntityOntologicalTypes
in interface KAoSActor
public java.util.Enumeration getEntityOntologicalTypeNames()
getEntityOntologicalTypeNames
in interface KAoSActor
public boolean isGuarded()
isGuarded
in interface KAoSActor
public boolean isRegistered()
isRegistered
in interface KAoSActor
public void setRegistered(boolean registered)
setRegistered
in interface KAoSActor
registered
- boolean indicating whether the KAoSActor has been registered in the KAoS DS.public void addCapability(AgentCapability capability) throws ModificationException
capability
- AgentCapability describing individual capability of this KAoSActor.
ModificationException
public boolean removeCapability(AgentCapability capability) throws ModificationException
capability
- The AgentCapability to be removed from the collection of this KAoSActor's capabilities.
ModificationException
public void setCapabilities(java.util.List capabilities) throws ModificationException
capabilities
- List containing the AgentCapabilities of this KAoSActor.
ModificationException
public java.util.List getCapabilities()
getCapabilities
in interface KAoSActor
public void setProperties(java.util.Hashtable properties)
properties
- Hashtable containing properties this KAoSActor.public java.util.Hashtable getProperties()
getProperties
in interface KAoSActor
public boolean isAutoPropertyValueCommit()
public void setAutoPropertyValueCommit(boolean autoCommit)
autoCommit
- boolean specifying the auto commit flag.public void addProperty(Property property, java.lang.Object value)
property
- Property to be added.value
- Object specifying the property value.public void removeProperty(Property property)
property
- Property to be removed.public void commitPropertyValues() throws ModificationException
ModificationException
- when one or more property changes failed to be committed to the Directory Service.
The exception lists the properties for which the modification failed.public Property getProperty(java.lang.String name)
getProperty
in interface KAoSActor
name
- String containing the name of the property to be returned.public void addPropertyValue(Property property, java.lang.Object value) throws ModificationException
property
- Property, whose value is to be added.value
- Object specifying the new value to be added to property values.
ModificationException
- when auto commit is true and when an error o
ccurred trying to update the property in the directory service.public void removePropertyValue(Property property, java.lang.Object value) throws ModificationException
property
- Property, whose value is to be removed.value
- Object specifying the new value to be added to property values.
ModificationException
- when auto commit is true and when an error occurred
trying to update the property in the Directory Service.public void setPropertyValue(Property property, java.lang.Object value) throws ModificationException
property
- Property, whose value is to be replaced.value
- Object specifying the new value to replace a property value.
ModificationException
- when auto commit is true and when an error occurred
trying to update the property in the Directory Service.public java.lang.Object getPropertyValue(Property property)
getPropertyValue
in interface KAoSActor
property
- Property, whose value is to be returned.
public void sendMessage(java.io.Serializable messageContent, KAoSActor receiver) throws NotLocatableException, TransportFailure
sendMessage
in interface KAoSActor
messageContent
- Serializable containing the message to be sent out.receiverdesc
- KAoSAgentDescription containing the description of the receiver.
NotLocatableException
- when the receiver cannot be located.
TransportFailureto
- when the transport system fails.
TransportFailure
public void receiveMessage(java.io.Serializable messageContent, KAoSActor sender)
receiveMessage
in interface KAoSActor
messageContent
- Serializable containing the received message.senderDesc
- KAoSAgentDescription containing the description of the sender.public java.util.List getTransports()
getTransports
in interface KAoSActor
public void addTransport(Transport transport) throws NoSuchTransportException
transport
- Transport to be added to the collection of actor's Transports.
NoSuchTransportException
public void removeTransport(Transport transport)
transport
- Transport to be removed from the collection of actor's Transports.public Transport getTransport(java.lang.String name)
getTransport
in interface KAoSActor
name
- String containing the Transport name to be retrieved.
public void receiveMessage(TransportMessage tmsg)
MessageListener
,
TransportMessage
,
"JAS Specification, Section(s) 3.4.2, 4.7.2"public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
hashCode()
,
"JAS Specification, Section(s) 4.7.2"public int hashCode()
super.hashCode()
.
hashCode
in class java.lang.Object
AgentName#hashCode
,
Object.hashCode()
,
"JAS Specification, Section(s) 4.7.2"public KAoSAgentDescription getAgentDescription()
protected void printTransportMessage(TransportMessage tmsg)
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 |