org.alicebot.server.net.listener
Class AliceChatListener

java.lang.Object
  extended by org.alicebot.server.net.listener.AliceChatListener
All Implemented Interfaces:
java.lang.Runnable, BotProcess
Direct Known Subclasses:
AliceAIM, AliceICQ, AliceIRC

public abstract class AliceChatListener
extends java.lang.Object
implements BotProcess

An abstract listener.


Field Summary
protected  Bot bot
          The bot for which this listener works.
protected  java.lang.String botID
          The id of the bot for which this listener works.
protected  java.util.HashMap parameters
          The parameters that can be set for this listener.
 
Constructor Summary
AliceChatListener(Bot bot, java.lang.String name, java.lang.String[][] parameters)
          Creates a new listener with name name.
 
Method Summary
abstract  boolean checkParameters()
          Checks that the parameters that have been set for the listener are okay.
 void setParameter(java.lang.String parameterName, java.lang.String parameterValue)
          Sets a parameter for the listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.alicebot.server.core.BotProcess
shutdown
 
Methods inherited from interface java.lang.Runnable
run
 

Field Detail

bot

protected Bot bot
The bot for which this listener works.


botID

protected java.lang.String botID
The id of the bot for which this listener works.


parameters

protected java.util.HashMap parameters
The parameters that can be set for this listener.

Constructor Detail

AliceChatListener

public AliceChatListener(Bot bot,
                         java.lang.String name,
                         java.lang.String[][] parameters)
Creates a new listener with name name.

Parameters:
bot - the bot for which this listener works
name - the name to give the listener
parameters - the parameters for the listener and their default values
Method Detail

setParameter

public void setParameter(java.lang.String parameterName,
                         java.lang.String parameterValue)
Sets a parameter for the listener.

Parameters:
parameterName - the name of the parameter
parameterValue - the value to set for the parameter

checkParameters

public abstract boolean checkParameters()
Checks that the parameters that have been set for the listener are okay.

Returns:
true if parameters are okay, false if not