|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fipaos.agent.FIPAOSAgent | +--org.opencyc.cycagent.fipaos.FipaOsCommunityAdapter
Provides the interface for interacting with the FIPA-OS agent community.
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.
Inner Class Summary | |
class |
FipaOsCommunityAdapter.AgreeInformTask
Provides for handling the reply to the request message of a fipa-request conversation. |
class |
FipaOsCommunityAdapter.IdleTask
Provides an idle task which handles incomming messages which are not otherwise associated with an in-progress conversation. |
class |
FipaOsCommunityAdapter.RequestTask
Provides for the initiation and handling of a fipa-request conversation. |
protected class |
FipaOsCommunityAdapter.Shutdown
Thread which shuts down the agent nicely. |
Inner classes inherited from class fipaos.agent.FIPAOSAgent |
fipaos.agent.FIPAOSAgent.TopLevelHandlerTask |
Field Summary | |
protected int |
diagnosticLevel
the FIPA-OS diagnostic level |
protected boolean |
isRegistered
Indicates whether this agent is registered. |
protected MessageReceiver |
messageReceiver
The parent agent object which implements the MessageReceiver interface. |
int |
msgSerialNumber
outbound message serial number. |
protected java.lang.String |
myAgentName
reference to the name of my agent |
static java.lang.String |
OWNER
the FIPA-OS agent owner |
static java.lang.String |
platform_profile
the platform profile location |
protected java.util.Hashtable |
replyMessages
Implements an association: message id --> reply message acl. |
protected int |
verbosity
Sets verbosity of this object's output. |
static long |
WAIT_FOREVER
|
protected java.util.Hashtable |
waitingReplyThreads
Implements an association: message id --> waiting thread for the reply. |
Fields inherited from class fipaos.agent.FIPAOSAgent |
_database_profile, _registered_with, _state, _tm |
Fields inherited from interface org.opencyc.cycagent.AgentCommunityAdapter |
COABS_AGENT_COMMUNITY, CYC_API_ONTOLOGY, CYC_ECHO_ONTOLOGY, DEFAULT_VERBOSITY, FIPA_OS_AGENT_COMMUNITY, FIPA_OS_AND_COABS_AGENT_COMMUNITIES, LOW_VERBOSITY, MAX_VERBOSITY, MEDIUM_VERBOSITY, QUIET_VERBOSITY |
Constructor Summary | |
FipaOsCommunityAdapter(MessageReceiver messageReceiver,
int verbosity)
Constructs a new FipaOsCommunityAdapter object for the given agent, with the given verbosity. |
Method Summary | |
fipaos.ont.fipa.ACL |
converseMessage(fipaos.ont.fipa.ACL acl,
Timer timer)
Sends an Agent Communication Language message and returns the reply. |
void |
deregister()
De-register this agent. |
void |
initialize(MessageReceiver messageReceiver,
int verbosity)
Not used in the FipaOsCommunityAdapter. |
java.lang.String |
nextMessageId()
Returns the next message serial number identifier. |
protected void |
register()
Registers the agent on the FIPA-OS agent community. |
void |
sendMessage(fipaos.ont.fipa.ACL acl)
Sends an Agent Communication Language message. |
void |
setVerbosity(int verbosity)
Sets verbosity of this object's output. |
void |
terminate()
Terminate this agent. |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class fipaos.agent.FIPAOSAgent |
activate, addNewProtocol, deregisterWithAMS, deregisterWithDF, forward, forward, getAID, getCM, getCurrentConversation, getHAP, getLocalAMS, getLocalAMSAID, getLocalDF, getLocalDFAID, getNewConversation, getOwnership, getPlatformProfile, getProfile, getState, isShutdown, knowsProtocol, notify, notify, notifyDone, notifyError, notifyMessageInEndedConversation, notifyMessageUndeliverable, notifyTimeout, registeredWith, registeredWithAMS, registeredWithDF, registerWithAMS, registerWithAMS, registerWithAMS, registerWithAMS, registerWithDF, registerWithDF, registerWithDF, registerWithDF, sendNotUnderstood, sendNotUnderstood, setListenerTask, setMessageSender, shutdown, startPushing, waitForPushLock |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.opencyc.cycagent.AgentCommunityAdapter |
getAID |
Field Detail |
public int msgSerialNumber
protected int verbosity
protected java.lang.String myAgentName
protected MessageReceiver messageReceiver
public static java.lang.String platform_profile
public static final java.lang.String OWNER
protected int diagnosticLevel
protected java.util.Hashtable waitingReplyThreads
protected java.util.Hashtable replyMessages
protected boolean isRegistered
public static final long WAIT_FOREVER
Constructor Detail |
public FipaOsCommunityAdapter(MessageReceiver messageReceiver, int verbosity)
verbosity
- the verbosity of this agent adapter's output. 0 --> quiet ... 9 -> maximum
diagnostic inputMethod Detail |
public void initialize(MessageReceiver messageReceiver, int verbosity) throws java.io.IOException
initialize
in interface AgentCommunityAdapter
messageReceiver
- the parent application which can receive agent messages via a callbackverbosity
- the verbosity of this agent adapter's output. 0 --> quiet ... 9 -> maximum
diagnostic inputprotected void register()
public void sendMessage(fipaos.ont.fipa.ACL acl)
sendMessage
in interface AgentCommunityAdapter
acl
- the Agent Communication Language message to be sentpublic fipaos.ont.fipa.ACL converseMessage(fipaos.ont.fipa.ACL acl, Timer timer) throws javax.naming.TimeLimitExceededException, java.io.IOException
converseMessage
in interface AgentCommunityAdapter
acl
- the Agent Communication Language message to be senttimer
- a Timer object contolling the maximum wait time for a reply message,
after which an excecption is thrown.public java.lang.String nextMessageId()
nextMessageId
in interface AgentCommunityAdapter
public void deregister()
deregister
in interface AgentCommunityAdapter
public void terminate()
terminate
in interface AgentCommunityAdapter
public void setVerbosity(int verbosity)
setVerbosity
in interface AgentCommunityAdapter
verbosity
- 0 --> quiet ... 9 -> maximum diagnostic inputpublic java.lang.String toString()
toString
in class java.lang.Object
a
- string representation of this object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |