|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.alicebot.server.core.responder.TextResponder
public class TextResponder
Logs output of all chat.
Field Summary | |
---|---|
protected static java.lang.String |
SPACE
A space, for convenience. |
Constructor Summary | |
---|---|
TextResponder()
Creates a new TextResponder
using encoding for System.in . |
Method Summary | |
---|---|
java.lang.String |
append(java.lang.String input,
java.lang.String response,
java.lang.String appendTo)
Simply appends the response to appendTo . |
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)
Simply returns the reply. |
java.lang.String |
preprocess(java.lang.String input,
java.lang.String hostname)
Returns the input, converted into Unicode from the request encoding. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String SPACE
Constructor Detail |
---|
public TextResponder()
TextResponder
using encoding for System.in
.
Method Detail |
---|
public java.lang.String preprocess(java.lang.String input, java.lang.String hostname)
preprocess
in interface Responder
input
- the inputhostname
- not used
public java.lang.String append(java.lang.String input, java.lang.String response, java.lang.String appendTo)
appendTo
.
append
in interface Responder
input
- an input from the clientresponse
- a reply from the botappendTo
- the string to which the client of the
Responder
may expect the reply to be appended
Responder
has decided to modify itpublic void log(java.lang.String input, java.lang.String reply, java.lang.String hostname, java.lang.String userid, java.lang.String botid)
Responder
log
in interface Responder
input
- the client's inputreply
- the bot's responsehostname
- the name of the hostpublic java.lang.String postprocess(java.lang.String reply)
postprocess
in interface Responder
reply
- the reply from the bot to be processed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |