|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opencyc.cycagent.GenericAgent
Provides generic agent capablilities for cyc agents participating in the CoABS and FIPA-OS agent communities.
Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.
THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Field Summary | |
protected AgentCommunityAdapter |
agentCommunityAdapter
The interface to either the CoABS or FIPA-OS agent community. |
protected AgentCommunityAdapter |
coAbsCommunityAdapter
the interface for interacting with the CoABS agent community |
static int |
DEFAULT_VERBOSITY
The default verbosity of the solution output. |
protected AgentCommunityAdapter |
fipaOsCommunityAdapter
the interface for interacting with the FIPA-OS agent community |
protected boolean |
messageConsumed
Indicates whether this class consumed the received message. |
protected java.lang.String |
myAgentName
name of the local agent |
protected java.lang.String |
myAgentType
type of the local agent |
protected int |
remoteAgentCommunity
agent community to which the remote agent belongs |
protected java.lang.String |
remoteAgentName
name of the remote agent |
protected int |
verbosity
Sets verbosity of the constraint solver output. |
Constructor Summary | |
GenericAgent()
Constructs a GenericAgent object. |
|
GenericAgent(java.lang.String myAgentName,
int verbosity)
Constructs a GenericAgent object for the given agent on both agent communities. |
|
GenericAgent(java.lang.String myAgentName,
int remoteAgentCommunity,
int verbosity)
Constructs a GenericAgent object for the given agent on the given agent community. |
Method Summary | |
static CycList |
aclToCycList(fipaos.ont.fipa.ACL acl)
Returns the CycList FIPA-2001 representation of the given ACL without using CycAccess. |
int |
agentCommunity()
Returns the agent community. |
java.lang.String |
agentCommunityName()
Returns the agent community name. |
java.lang.String |
getAgentType()
Returns my agent type (FIPA-OS requirement). |
fipaos.ont.fipa.fipaman.AgentID |
getAID(int remoteAgentCommunity)
Gets the AgentID of this Agent |
AgentCommunityAdapter |
getCoAbsCommunityAdapter()
Returns the CoABS agent community adapter |
AgentCommunityAdapter |
getFipaOsCommunityAdapter()
Returns the FIPA-OS agent community adapter |
java.lang.String |
getMyAgentName()
Returns my agent name. |
void |
initializeAgentCommunity()
Initialializes the agent community with the given degree of diagnostic verbosity. |
fipaos.ont.fipa.fipaman.AgentID |
makeAID(java.lang.String agentName,
int remoteAgentCommunity)
Makes an AgentID for the given agent name |
void |
messageReceived(int remoteAgentCommunity,
fipaos.ont.fipa.ACL acl)
Notifies my agent that an Agent Communication Language message has been received. |
void |
processEchoRequest(int remoteAgentCommunity,
fipaos.ont.fipa.ACL echoRequestAcl)
Processes an echo request from another agent. |
void |
setVerbosity(int verbosity)
Sets verbosity of the output. |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int DEFAULT_VERBOSITY
protected int verbosity
protected java.lang.String myAgentName
protected java.lang.String remoteAgentName
protected int remoteAgentCommunity
protected java.lang.String myAgentType
protected AgentCommunityAdapter coAbsCommunityAdapter
protected AgentCommunityAdapter fipaOsCommunityAdapter
protected AgentCommunityAdapter agentCommunityAdapter
protected boolean messageConsumed
Constructor Detail |
public GenericAgent()
public GenericAgent(java.lang.String myAgentName, int verbosity)
myAgentName
- name of the local agentremoteAgentCommunity
- indicates either CoAbs or FIPA-OS agent communityverbosity
- the verbosity of this agent adapter's output. 0 --> quiet ... 9 -> maximum
diagnostic inputpublic GenericAgent(java.lang.String myAgentName, int remoteAgentCommunity, int verbosity)
myAgentName
- name of the local agentremoteAgentCommunity
- indicates either CoAbs or FIPA-OS agent communityverbosity
- the verbosity of this agent adapter's output. 0 --> quiet ... 9 -> maximum
diagnostic inputMethod Detail |
public void initializeAgentCommunity()
public void messageReceived(int remoteAgentCommunity, fipaos.ont.fipa.ACL acl)
messageReceived
in interface MessageReceiver
remoteAgentCommunity
- indicates either CoAbs or FIPA-OS agent communityacl
- the Agent Communication Language message which has been received for my agentpublic void processEchoRequest(int remoteAgentCommunity, fipaos.ont.fipa.ACL echoRequestAcl)
remoteAgentCommunity
- indicates either CoAbs or FIPA-OS agent communityechoRequestAcl
- the echo request Agent Communication Language messagepublic int agentCommunity()
public java.lang.String agentCommunityName()
public AgentCommunityAdapter getCoAbsCommunityAdapter()
public AgentCommunityAdapter getFipaOsCommunityAdapter()
public java.lang.String getMyAgentName()
getMyAgentName
in interface MessageReceiver
public java.lang.String getAgentType()
getAgentType
in interface MessageReceiver
public fipaos.ont.fipa.fipaman.AgentID getAID(int remoteAgentCommunity)
remoteAgentCommunity
- indicates either CoAbs or FIPA-OS agent communitypublic fipaos.ont.fipa.fipaman.AgentID makeAID(java.lang.String agentName, int remoteAgentCommunity)
agentName
- the name of the agentremoteAgentCommunity
- indicates either CoAbs or FIPA-OS agent communitypublic static CycList aclToCycList(fipaos.ont.fipa.ACL acl) throws org.jdom.JDOMException, java.io.IOException
acl
- the Agent Communication Lanaguage message object.public java.lang.String toString()
toString
in class java.lang.Object
public void setVerbosity(int verbosity)
verbosity
- 0 --> quiet ... 9 -> maximum diagnostic input
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |