## org.opencyc.chat
Class ConsoleChat

    java.lang.Object
      |
      +--org.opencyc.chat.ConsoleChat

All Implemented Interfaces:
  ChatSender

public class ConsoleChat
extends java.lang.Object
implements ChatSender

Provides a console chat application using the Cyc ChatterBot.

The chat conversation is in the form of a text conversation using asynchronous receiving and sending of messages.

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
`protected ChatterBot` `chatterBot` reference to ChatterBot

Constructor Summary
`ConsoleChat()` Constructs a new ConsoleChat object.

Method Summary
`protected void` `chat()` Provides a console interface to the ChatterBot.
`static void` `main(java.lang.String[] args)` Provides a main function to launch the ConsoleChat application.
`protected java.lang.String` `receiveChatMessage()` Receives chat messages from the user.
`void` `sendChatMessage(java.lang.String chatMessage)` Sends the chat message from Cyc into the chat system.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### chatterBot

    protected ChatterBot chatterBot

  reference to ChatterBot

Constructor Detail

### ConsoleChat

    public ConsoleChat()

  Constructs a new ConsoleChat object.

Method Detail

### main

    public static void main(java.lang.String[] args)

  Provides a main function to launch the ConsoleChat application. The args are not used.
  Parameters:
    `args` - not used

### chat

    protected void chat()
                 throws CycApiException,
                        java.io.IOException,
                        ChatException

  Provides a console interface to the ChatterBot.

### receiveChatMessage

    protected java.lang.String receiveChatMessage()
                                           throws java.io.IOException

  Receives chat messages from the user.

### sendChatMessage

    public void sendChatMessage(java.lang.String chatMessage)

  Sends the chat message from Cyc into the chat system.
  Specified by:
    `sendChatMessage` in interface `ChatSender`