## org.opencyc.cycagent
Interface AgentCommunityAdapter

All Known Implementing Classes:
  CoAbsCommunityAdapter, FipaOsCommunityAdapter

public interface AgentCommunityAdapter

Defines the interface for interacting with an agent community such as CoABS or FIPA-OS.

Author:
  Stephen L. Reed

  Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.

  the license

  www.opencyc.org

  OpenCyc at SourceForge

  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
`static int` `COABS_AGENT_COMMUNITY` Indicates the CoABS agent community.
`static java.lang.String` `CYC_API_ONTOLOGY` Indicates the cyc-api ontology (role).
`static java.lang.String` `CYC_ECHO_ONTOLOGY` Indicates the cyc-echo ontology (role).
`static int` `DEFAULT_VERBOSITY` The default verbosity of the solution output.
`static int` `FIPA_OS_AGENT_COMMUNITY` Indicates the FIPA-OS agent community.
`static int` `FIPA_OS_AND_COABS_AGENT_COMMUNITIES` Indicates both the FIPA-OS and CoABS agent communities.
`static int` `LOW_VERBOSITY` Low verbosity of the solution output.
`static int` `MAX_VERBOSITY` Maximum verbosity of the solution output.
`static int` `MEDIUM_VERBOSITY` Medium verbosity of the solution output.
`static int` `QUIET_VERBOSITY` Quiet verbosity of the solution output.

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.
`fipaos.ont.fipa.fipaman.AgentID` `getAID()` Gets the AgentID of this Agent.
`void` `initialize(MessageReceiver messageReceiver, int verbosity)` Initializes the new CoAbsCommunityAdapter instance.
`java.lang.String` `nextMessageId()` Returns the next message serial number identifier.
`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.

Field Detail

### QUIET_VERBOSITY

    public static final int QUIET_VERBOSITY

  Quiet verbosity of the solution output. 0 --> quiet ... 9 -> maximum diagnostic input.

### LOW_VERBOSITY

    public static final int LOW_VERBOSITY

  Low verbosity of the solution output. 0 --> quiet ... 9 -> maximum diagnostic input.

### MEDIUM_VERBOSITY

    public static final int MEDIUM_VERBOSITY

  Medium verbosity of the solution output. 0 --> quiet ... 9 -> maximum diagnostic input.

### MAX_VERBOSITY

    public static final int MAX_VERBOSITY

  Maximum verbosity of the solution output. 0 --> quiet ... 9 -> maximum diagnostic input.

### DEFAULT_VERBOSITY

    public static final int DEFAULT_VERBOSITY

  The default verbosity of the solution output. 0 --> quiet ... 9 -> maximum diagnostic input.

### COABS_AGENT_COMMUNITY

    public static final int COABS_AGENT_COMMUNITY

  Indicates the CoABS agent community.

### FIPA_OS_AGENT_COMMUNITY

    public static final int FIPA_OS_AGENT_COMMUNITY

  Indicates the FIPA-OS agent community.

### FIPA_OS_AND_COABS_AGENT_COMMUNITIES

    public static final int FIPA_OS_AND_COABS_AGENT_COMMUNITIES

  Indicates both the FIPA-OS and CoABS agent communities.

### CYC_API_ONTOLOGY

    public static final java.lang.String CYC_API_ONTOLOGY

  Indicates the cyc-api ontology (role).

### CYC_ECHO_ONTOLOGY

    public static final java.lang.String CYC_ECHO_ONTOLOGY

  Indicates the cyc-echo ontology (role).

Method Detail

### initialize

    public void initialize(MessageReceiver messageReceiver,
                           int verbosity)
                    throws java.io.IOException

  Initializes the new CoAbsCommunityAdapter instance. Not used in the FipaOsCommunityAdapter.
  Parameters:
    `messageReceiver` - the parent application which can receive agent messages via a callback
    `verbosity` - the verbosity of this agent adapter's output. 0 --> quiet ... 9 -> maximum diagnostic input

### sendMessage

    public void sendMessage(fipaos.ont.fipa.ACL acl)
                     throws java.io.IOException

  Sends an Agent Communication Language message.
  Parameters:
    `acl` - the Agent Communication Language message to be sent

### converseMessage

    public fipaos.ont.fipa.ACL converseMessage(fipaos.ont.fipa.ACL acl,
                                               Timer timer)
                                        throws javax.naming.TimeLimitExceededException,
                                               java.io.IOException

  Sends an Agent Communication Language message and returns the reply.
  Parameters:
    `acl` - the Agent Communication Language message to be sent
    `timer` - the Timer object controlling the maximum wait time for a reply message, after which an excecption is thrown.
  Returns:
    the Agent Communication Language reply message which has been received for my agent

### nextMessageId

    public java.lang.String nextMessageId()

  Returns the next message serial number identifier.
  Returns:
    the next message serial number identifier

### deregister

    public void deregister()

  De-register this agent.

### terminate

    public void terminate()

  Terminate this agent.

### getAID

    public fipaos.ont.fipa.fipaman.AgentID getAID()

  Gets the AgentID of this Agent. Not used by the CoAbsCommunityAdapter.

### setVerbosity

    public void setVerbosity(int verbosity)

  Sets verbosity of this object's output. 0 --> quiet ... 9 -> maximum diagnostic input.
  Parameters:
    `verbosity` - 0 --> quiet ... 9 -> maximum diagnostic input