org.alicebot.server.core.responder
Class AIMResponder

java.lang.Object
  extended by org.alicebot.server.core.responder.AIMResponder
All Implemented Interfaces:
Responder

public class AIMResponder
extends java.lang.Object
implements Responder


Constructor Summary
AIMResponder()
           
 
Method Summary
 java.lang.String append(java.lang.String input, java.lang.String response, java.lang.String appendTo)
           Response by a Responder is considered an "append" to some previous string.
 void log(java.lang.String input, java.lang.String reply, java.lang.String hostname, java.lang.String userid, java.lang.String botid)
          Logs an input/response pair to the appropriate place.
 java.lang.String postprocess(java.lang.String reply)
           Postprocesses a message from a bot as appropriate for a given channel.
 java.lang.String preprocess(java.lang.String input, java.lang.String hostname)
           Preprocesses a message from a bot as appropriate for a given channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AIMResponder

public AIMResponder()
Method Detail

preprocess

public java.lang.String preprocess(java.lang.String input,
                                   java.lang.String hostname)
Description copied from interface: Responder

Preprocesses a message from a bot as appropriate for a given channel.

For some channels, this may involve doing substitutions on the message; for some channels this may mean formatting the message in a particular way, etc.

Specified by:
preprocess in interface Responder
Parameters:
input - the message to be formatted
hostname - the name of the host that is generating the message
Returns:
the result of preprocessing the message

append

public java.lang.String append(java.lang.String input,
                               java.lang.String response,
                               java.lang.String appendTo)
Description copied from interface: Responder

Response by a Responder is considered an "append" to some previous string. That string might be some form of the previous exchange, or it might be nothing.

Specified by:
append in interface Responder
Parameters:
input - an input from the client
response - a reply from the bot
appendTo - the string to which the client of the Responder may expect the reply to be appended
Returns:
the reply, in whatever fashion the Responder has decided to modify it

log

public void log(java.lang.String input,
                java.lang.String reply,
                java.lang.String hostname,
                java.lang.String userid,
                java.lang.String botid)
Description copied from interface: Responder
Logs an input/response pair to the appropriate place.

Specified by:
log in interface Responder
Parameters:
input - the client's input
reply - the bot's response
hostname - the name of the host

postprocess

public java.lang.String postprocess(java.lang.String reply)
Description copied from interface: Responder

Postprocesses a message from a bot as appropriate for a given channel.

For some channels, this may involve doing substitutions on the message; for some channels this may mean formatting the message in a particular way, etc.

Specified by:
postprocess in interface Responder
Returns:
the result of postprocessing the message