com.shimari.bot
Class ConsoleConnection

java.lang.Object
  extended bycom.shimari.bot.ConsoleConnection
All Implemented Interfaces:
Channel, Component, Connection, java.lang.Runnable

public class ConsoleConnection
extends java.lang.Object
implements Connection, java.lang.Runnable

ConsoleConnection interacts on the command line; it's useful for testing the Bot without connecting to an actual IRC server.


Constructor Summary
ConsoleConnection()
           
 
Method Summary
 void broadcastMessage(java.lang.String message)
           
 void broadcastNotice(java.lang.String message)
           
 void connect()
           
 void disconnect()
           
 void init(Registry components)
           
 boolean isConnected()
           
 void run()
           
 void sendMessage(java.lang.String target, java.lang.String message)
           
 void setMessageQueue(java.util.Collection queue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleConnection

public ConsoleConnection()
Method Detail

init

public void init(Registry components)
Specified by:
init in interface Component

isConnected

public boolean isConnected()
Specified by:
isConnected in interface Connection

sendMessage

public void sendMessage(java.lang.String target,
                        java.lang.String message)
Specified by:
sendMessage in interface Connection

broadcastMessage

public void broadcastMessage(java.lang.String message)
Specified by:
broadcastMessage in interface Connection

broadcastNotice

public void broadcastNotice(java.lang.String message)
Specified by:
broadcastNotice in interface Connection

connect

public void connect()
             throws java.io.IOException
Specified by:
connect in interface Connection
Throws:
java.io.IOException

disconnect

public void disconnect()
Specified by:
disconnect in interface Connection

setMessageQueue

public void setMessageQueue(java.util.Collection queue)
Specified by:
setMessageQueue in interface Connection

run

public void run()
Specified by:
run in interface java.lang.Runnable