|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nasa.arc.brahms.common.data.BrahmsObject
gov.nasa.arc.brahms.common.data.ModelElement
gov.nasa.arc.brahms.common.data.NamedModelElement
gov.nasa.arc.brahms.common.data.Concept
gov.nasa.arc.brahms.common.data.ActiveConcept
gov.nasa.arc.brahms.common.data.ActiveInstance
gov.nasa.arc.brahms.common.data.Agent
gov.nasa.arc.brahms.vm.data.VMAgent
public class VMAgent
The VMAgent is an Agent with extensions for use in the Brahms virtual machine. An agent in Brahms is the most central construct in a Brahms model. An agent represents an interactive system, a subject with behavior interacting with the world. An agent can for example represent a person in an organization, but could also represent an animal in a forest. A Brahms model is always about the activities of agents in a work process.
Agent,
Serialized Form| Field Summary | |
|---|---|
static long |
EXCEPTION_TIMEOUT
Constant specifying the recommended default time-out after an exception |
static int |
NUM_RETRIES
Constant specifying the recommended default number of retries |
| Fields inherited from class gov.nasa.arc.brahms.common.data.Concept |
|---|
ATTRIBUTES_PROPERTY, RELATIONS_PROPERTY |
| Fields inherited from class gov.nasa.arc.brahms.common.data.NamedModelElement |
|---|
NAME_PROPERTY |
| Fields inherited from interface gov.nasa.arc.brahms.common.IConstants |
|---|
ABORT, ACTIVECLASS, ACTIVECONCEPT, ACTIVEINSTANCE, AGENT, ANONYMOUS, ANYAGENT, AREA, AREADEF, ASSIGNED, ATTRIBUTE, BASEAREADEF, BASECLASS, BASECONCEPTUALCLASS, BASEGROUP, BASELIBRARY, BOOLEAN, BROADCAST, BUILDING, BYTE, CCLOCK, CDATE, CHAR, CITY, CLASS, CLOCK, COLLECTALL, COMMUNICATE, COMPLETE, COMPOSITE, COMPUTER, CONCEPT, CONCEPTUALCLASS, CONCEPTUALCONCEPT, CONCEPTUALOBJECT, CONTINUE, COPY, CREATEAGENT, CREATEAREA, CREATEOBJECT, current, CURRENT, DATAFRAME, DATE, DB, DETECTABLE, DIV, DOUBLE, EMAIL, EMPTY_STRING, END, ENDACTIVITY, ENTAGENT, EQ, EXCEPTION, EXPR, FACE2FACE, FACTFRAME, FALSE, FAX, FLOAT, FOREACH, FORONE, G2, GE, GEOGRAPHYCONCEPT, GESTURE, GET, GROUP, GT, IMPASSE, INT, INVALID, JAVA, JAVA_TYPE, KNOWN_MODIFIER, KNOWNVAL_MODIFIER, LE, LOCAL, LONG, LT, MAP, MINUS, MOD, MOVE, MULT, NE, NEW, NONE, NOT_MODIFIER, NOWORK, O, OA, OBJECT, ONTOLOGY, PAGER, PARAMETER, PATH, PHONE, PLUS, PRIMITIVE, PRIVATE, PROAGENT, PROTECTED, PRSAGENT, PUBLIC, PUT, RECEIVE, RELATION, sACTIVECLASS, sACTIVECONCEPT, sACTIVEINSTANCE, sAGENT, sARCHIVE, sAREA, sAREADEF, sBOOLEAN, sBYTE, sBYTECODEEXT, sCHAR, sCLASS, sCOMPUTER, sCONCEPT, sCONCEPTUALCLASS, sCONCEPTUALCONCEPT, sCONCEPTUALOBJECT, sCOPY, sCURRENT, sDETECTABLE, sDOUBLE, sEMAIL, sEND, SEND, sFACE2FACE, sFAX, sFILEEXT, sFLOAT, sGEOGRAPHYCONCEPT, sGROUP, SHORT, SIMAGENT, sINT, sJAVA_TYPE, sLONG, sMAP, sNEW, sNONE, sNOWORK, sOBJECT, SOURCECODE, sPAGER, sPARAMETER, sPATH, sPHONE, sPRIVATE, sPROJECTEXT, sPROTECTED, sPUBLIC, sSHORT, sSTART, sSTRING, sSYMBOL, START, STRING, sUNKNOWN, sVOID, SYMBOL, TRUE, UDT, UML, UNASSIGNED, UNDEFINED, unknown, UNKNOWN, UNKNOWN_MODIFIER, V, VARIABLE, VOID, WHENEVER, WORKFRAME, WORLD, XML |
| Constructor Summary | |
|---|---|
VMAgent()
Constructor, creates a new agent for use in the virtual machine. |
|
VMAgent(java.lang.String name)
Constructor, creates a new agent with the specified name for use in the virtual machine. |
|
VMAgent(java.lang.String file,
int line)
Constructor, creates a new agent for use in the virtual machine and for which its specification is stored in the specified file at the specified line number. |
|
VMAgent(java.lang.String name,
java.lang.String file,
int line)
Constructor, creates a new agent with the specified name for use in the virtual machine and for which its specification is stored in the specified file at the specified line number. |
|
| Method Summary | |
|---|---|
void |
addJunkFilter(java.lang.String conversationID)
Adds the specified conversation identifier to the junk filter to ensure that any incoming messages with that conversation identifier are ignored. |
IConceptCtx |
createContext()
Creates a new context for this concept for use in a virtual machine. |
void |
deregister()
Unregisters the agent from the CI. |
boolean |
equals(java.lang.Object obj)
Tests whether two VMAgents are equal. |
gov.nasa.arc.brahms.vm.ci.BrahmsCIActor |
getActor()
Returns this agent's Collaborative Infrastructure actor. |
gov.nasa.ci.corba.api.directory.Advertisement |
getAdvertisement()
Returns the agent's advertisement. |
gov.nasa.ci.corba.api.Credentials |
getCredentials()
Returns the agent's credentials. |
gov.nasa.ci.corba.api.data.IDataDistributionService |
getDataDistributionService()
Returns a reference to the data distribution service used to publish data and used to subscribe for data. |
gov.nasa.ci.api.actor.IActorDescriptor |
getDescriptor()
Returns the actor's descriptor. |
gov.nasa.ci.corba.api.directory.IDirectoryService |
getDirectoryService()
Returns a reference to the directory service used to register/deregister the actor and to lookup other actors. |
java.lang.String |
getExternalImplementationClass()
Returns the fully qualified classname for the Java class that provides the agent's implementation if the agent is an external agent. |
java.util.Enumeration |
getInitialBeliefs(boolean includeParents)
Returns the agent's initial beliefs. |
java.util.Enumeration |
getInitialFacts(boolean includeParents)
Returns the agent's initial facts. |
protected Relation |
getIsMemberOfRelation()
Returns the isMemberOf relation as defined by BaseGroup. |
gov.nasa.ci.corba.api.logging.ILoggingService |
getLoggingService()
Returns a reference to the logging service used to log debug, informational, warning, error and fatal messages reported by the actor. |
gov.nasa.ci.api.actor.IManagedActor |
getManagedActor()
Returns the actor's management interface. |
gov.nasa.ci.corba.api.management.IManagementService |
getManagementService()
Returns a reference to the management service used to allow for the remote monitoring and control of the actor. |
gov.nasa.ci.corba.api.time.ITimeService |
getTimeService()
Returns a reference to the time service used to provide time information and time notification services. |
gov.nasa.ci.corba.api.transport.ITransportService |
getTransportService()
Returns a reference to the transport service used to create and send messages. |
void |
processMessage(gov.nasa.ci.api.communication.ICommunicativeAct message)
Invoked when a new ICommunicativeAct was received intended for this actor. |
void |
register()
Registers the agent with the CI |
void |
setAdvertisement(gov.nasa.ci.corba.api.directory.Advertisement advertisement)
Sets the agent's advertisement. |
void |
setCredentials(gov.nasa.ci.corba.api.Credentials credentials)
Sets the agent's credentials. |
void |
setExternalImplementationClass(java.lang.String className)
Sets the fully qualified classname for the Java class that provides the agent's implementation if the agent is an external agent. |
| Methods inherited from class gov.nasa.arc.brahms.common.data.Agent |
|---|
addParent, delete, getActivitiesRecursive, getActivitiesRecursive, getActivityByDescriptorRecursive, getAttributeRecursive, getAttributesRecursive, getInitialBeliefsRecursive, getInitialFactsRecursive, getParent, getParents, getParents, getRelationRecursive, getRelationsRecursive, getThoughtframesRecursive, getWorkframesRecursive, hasParents, isExternal, isInstanceOf, removeParent, setExternal, setID |
| Methods inherited from class gov.nasa.arc.brahms.common.data.ActiveInstance |
|---|
getLocation, setLocation |
| Methods inherited from class gov.nasa.arc.brahms.common.data.Concept |
|---|
addAttribute, addRelation, compareTypes, getAttribute, getAttributes, getContext, getFullyQualifiedName, getIcon, getModel, getName, getPackage, getRelation, getRelations, getType, hasAttributes, hasRelations, isLocal, isSerializable, removeAttribute, removeRelation, setContext, setIcon, setLocal, setModel, setPackage, setSerializable, toString |
| Methods inherited from class gov.nasa.arc.brahms.common.data.NamedModelElement |
|---|
getDisplayText, getOwner, setDisplayText, setFullyQualifiedName, setName, setOwner |
| Methods inherited from class gov.nasa.arc.brahms.common.data.BrahmsObject |
|---|
export, getFile, getID, getLine, getSerialNumber, isBCC, isDynamic, isLoaded, isResolved, setBCC, setDynamic, setFile, setID, setLine, setLoaded, setResolved, setSerialNumber |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface gov.nasa.arc.brahms.vm.data.IVMInstance |
|---|
getContext, getFullyQualifiedName, getID, getName, isDynamic, isLocal, isSerializable, setDynamic, setSerializable |
| Methods inherited from interface gov.nasa.arc.brahms.common.data.Type |
|---|
getSerialNumber |
| Field Detail |
|---|
public static final long EXCEPTION_TIMEOUT
public static final int NUM_RETRIES
| Constructor Detail |
|---|
public VMAgent()
public VMAgent(java.lang.String name)
name - the name of the agent
public VMAgent(java.lang.String file,
int line)
file - the file in which the agent is specifiedline - the line number at which the agent's specification starts in the file
public VMAgent(java.lang.String name,
java.lang.String file,
int line)
name - the name of the agentfile - the file in which the agent is specifiedline - the line number at which the agent's specification starts in the file| Method Detail |
|---|
public void setExternalImplementationClass(java.lang.String className)
className - the fully qualified Java class namepublic java.lang.String getExternalImplementationClass()
public gov.nasa.arc.brahms.vm.ci.BrahmsCIActor getActor()
throws VMException
VMException - if an error occurs creating the CI actorpublic gov.nasa.ci.api.actor.IActorDescriptor getDescriptor()
getDescriptor in interface gov.nasa.arc.brahms.vm.ci.ICIActorpublic gov.nasa.ci.corba.api.Credentials getCredentials()
getCredentials in interface gov.nasa.arc.brahms.vm.ci.ICIActorpublic void setCredentials(gov.nasa.ci.corba.api.Credentials credentials)
setCredentials in interface gov.nasa.arc.brahms.vm.ci.ICIActorcredentials - the agent's Credentialspublic gov.nasa.ci.corba.api.directory.Advertisement getAdvertisement()
getAdvertisement in interface gov.nasa.arc.brahms.vm.ci.ICIActorpublic void setAdvertisement(gov.nasa.ci.corba.api.directory.Advertisement advertisement)
setAdvertisement in interface gov.nasa.arc.brahms.vm.ci.ICIActoradvertisement - the agent's Advertisement
public void register()
throws ConceptRegistrationException
register in interface gov.nasa.arc.brahms.vm.ci.ICIActorConceptRegistrationException - if there's an error registering the concept
public void deregister()
throws VMException
deregister in interface gov.nasa.arc.brahms.vm.ci.ICIActorVMException - if an error occurs during the de-registrationpublic void processMessage(gov.nasa.ci.api.communication.ICommunicativeAct message)
processMessage in interface gov.nasa.arc.brahms.vm.ci.ICIActormessage - the ICommunicativeAct intended for this actorpublic void addJunkFilter(java.lang.String conversationID)
addJunkFilter in interface gov.nasa.arc.brahms.vm.ci.ICIActorconversationID - the conversation id for the messages that need to be ignoredpublic gov.nasa.ci.api.actor.IManagedActor getManagedActor()
getManagedActor in interface gov.nasa.arc.brahms.vm.ci.ICIActor
public gov.nasa.ci.corba.api.directory.IDirectoryService getDirectoryService()
throws gov.nasa.ci.corba.api.ServiceException
getDirectoryService in interface gov.nasa.arc.brahms.vm.ci.ICIActorgov.nasa.ci.corba.api.ServiceException - if there was an error obtaining the service
public gov.nasa.ci.corba.api.transport.ITransportService getTransportService()
throws gov.nasa.ci.corba.api.ServiceException
getTransportService in interface gov.nasa.arc.brahms.vm.ci.ICIActorgov.nasa.ci.corba.api.ServiceException - if there was an error obtaining the service
public gov.nasa.ci.corba.api.data.IDataDistributionService getDataDistributionService()
throws gov.nasa.ci.corba.api.ServiceException
getDataDistributionService in interface gov.nasa.arc.brahms.vm.ci.ICIActorgov.nasa.ci.corba.api.ServiceException - if there was an error obtaining the service
public gov.nasa.ci.corba.api.management.IManagementService getManagementService()
throws gov.nasa.ci.corba.api.ServiceException
getManagementService in interface gov.nasa.arc.brahms.vm.ci.ICIActorgov.nasa.ci.corba.api.ServiceException - if there was an error obtaining the service
public gov.nasa.ci.corba.api.time.ITimeService getTimeService()
throws gov.nasa.ci.corba.api.ServiceException
getTimeService in interface gov.nasa.arc.brahms.vm.ci.ICIActorgov.nasa.ci.corba.api.ServiceException - if there was an error obtaining the service
public gov.nasa.ci.corba.api.logging.ILoggingService getLoggingService()
throws gov.nasa.ci.corba.api.ServiceException
getLoggingService in interface gov.nasa.arc.brahms.vm.ci.ICIActorgov.nasa.ci.corba.api.ServiceException - if there was an error obtaining the servicepublic IConceptCtx createContext()
Note: This method always returns a new instance and does not verify whether one is already created.
createContext in class Agentprotected Relation getIsMemberOfRelation()
public java.util.Enumeration getInitialFacts(boolean includeParents)
getInitialFacts in class ActiveConceptincludeParents - true if also the initial facts of its parent classes and superclasses
are to be included, false otherwise
public java.util.Enumeration getInitialBeliefs(boolean includeParents)
getInitialBeliefs in class ActiveConceptincludeParents - true if also the initial beliefs of its parent classes and superclasses
are to be included, false otherwise
public boolean equals(java.lang.Object obj)
equals in class Conceptobj - the Object to be compared for equality
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||