|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opencyc.cycagent.GenericAgent | +--org.opencyc.cycagent.CycProxy
Provides a proxy for a cyc api service on the CoABS grid or FIPA-OS agent community, and also creates CycAgentProxy objects for each Cyc-hosted agent.
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 | |
CycConnection |
agentsCycConnection
One CycConnection object to send and receive asynchronous messsages with the Cyc server. |
protected static java.util.Hashtable |
cycAgentProxies
Association of Cyc-hosted agent names with their CycAgentProxy objects. |
protected static java.util.Hashtable |
cycApiConnectionCache
Cached CycConnection objects which preserve Cyc session state. |
Fields inherited from class org.opencyc.cycagent.GenericAgent |
agentCommunityAdapter, coAbsCommunityAdapter, DEFAULT_VERBOSITY, fipaOsCommunityAdapter, messageConsumed, myAgentName, myAgentType, remoteAgentCommunity, remoteAgentName, verbosity |
Constructor Summary | |
CycProxy(java.lang.String myAgentName,
int verbosity)
Constructs a CycProxy object for the given agent on both agent communities. |
|
CycProxy(java.lang.String myAgentName,
int remoteAgentCommunity,
int verbosity)
Constructs a CycProxy object for the given agent on the given agent community. |
Method Summary | |
protected void |
handleMessageFromCyc(CycList fipaTransportMessage)
Handles one inbound asynchronous message from a Cyc-hosted agent. |
protected void |
handleMessagesFromCyc()
Handles inbound asynchronous messages from Cyc-hosted agents. |
void |
messageReceived(int remoteAgentCommunity,
fipaos.ont.fipa.ACL acl)
Notifies my agent that an Agent Communication Language message has been received. |
void |
processApiRequest(int remoteAgentCommunity,
fipaos.ont.fipa.ACL apiRequestAcl)
Processes a cyc api request from another agent. |
void |
setVerbosity(int verbosity)
Sets verbosity of the output. |
Methods inherited from class org.opencyc.cycagent.GenericAgent |
aclToCycList, agentCommunity, agentCommunityName, getAgentType, getAID, getCoAbsCommunityAdapter, getFipaOsCommunityAdapter, getMyAgentName, initializeAgentCommunity, makeAID, processEchoRequest, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static java.util.Hashtable cycApiConnectionCache
public CycConnection agentsCycConnection
protected static java.util.Hashtable cycAgentProxies
Constructor Detail |
public CycProxy(java.lang.String myAgentName, int verbosity)
myAgentName
- name of the local agentverbosity
- the verbosity of this agent adapter's output. 0 --> quiet ... 9 -> maximum
diagnostic inputpublic CycProxy(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 |
protected void handleMessagesFromCyc()
protected void handleMessageFromCyc(CycList fipaTransportMessage)
fipaTransportMessage
- the message from a Cyc-hosted agentpublic void messageReceived(int remoteAgentCommunity, fipaos.ont.fipa.ACL acl)
messageReceived
in class GenericAgent
remoteAgentCommunity
- indicates either CoAbs or FIPA-OS agent communityacl
- the Agent Communication Language message which has been received for my agentpublic void processApiRequest(int remoteAgentCommunity, fipaos.ont.fipa.ACL apiRequestAcl)
remoteAgentCommunity
- indicates either CoAbs or FIPA-OS agent communityapiRequestAcl
- the api request Agent Communication Language messagepublic void setVerbosity(int verbosity)
setVerbosity
in class GenericAgent
verbosity
- 0 --> quiet ... 9 -> maximum diagnostic input
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |