|
|||||||||
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.Echo
Provides an example agent demonstrating the echo role.
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 | |
java.lang.String |
echoMessageText
|
protected static long |
oneMinuteDuration
|
Fields inherited from class org.opencyc.cycagent.GenericAgent |
agentCommunityAdapter, coAbsCommunityAdapter, DEFAULT_VERBOSITY, fipaOsCommunityAdapter, messageConsumed, myAgentName, myAgentType, remoteAgentCommunity, remoteAgentName, verbosity |
Constructor Summary | |
Echo()
Constructs a new Echo agent object. |
Method Summary | |
void |
doEcho()
Initializes the agent community adapter, sends the echo message, and displays the echo response. |
static void |
main(java.lang.String[] args)
Provides the main method to run the Echo class as an application. |
void |
messageReceived(int remoteAgentCommunity,
fipaos.ont.fipa.ACL acl)
Notifies my agent that an Agent Communication Language message has been received. |
Methods inherited from class org.opencyc.cycagent.GenericAgent |
aclToCycList, agentCommunity, agentCommunityName, getAgentType, getAID, getCoAbsCommunityAdapter, getFipaOsCommunityAdapter, getMyAgentName, initializeAgentCommunity, makeAID, processEchoRequest, setVerbosity, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final long oneMinuteDuration
public java.lang.String echoMessageText
Constructor Detail |
public Echo()
Method Detail |
public static void main(java.lang.String[] args)
args
- the command line arguments.public void doEcho()
public 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 agent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |