|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.alicebot.server.net.listener.AliceChatListener org.alicebot.server.net.listener.AliceICQ
public class AliceICQ
This code is from the Everybuddy Java Project by Chris Carlin (http://EBJava.sourceforge.net/) modified to work with an Alicebot server.
Field Summary | |
---|---|
static java.lang.String |
label
Please document. |
protected java.net.DatagramSocket |
socket
Please document. |
Fields inherited from class org.alicebot.server.net.listener.AliceChatListener |
---|
bot, botID, parameters |
Constructor Summary | |
---|---|
AliceICQ(Bot bot)
Creates a new AliceICQ chat listener for a given bot. |
Method Summary | |
---|---|
void |
ack(byte a,
byte b)
|
boolean |
checkParameters()
Checks that the parameters that have been set for the listener are okay. |
byte[] |
header(short command)
|
void |
run()
Please document this. |
void |
send(byte[] buffer)
|
void |
sendMesg(int to,
java.lang.String mesg)
|
void |
shutdown()
Shuts down the process. |
void |
signoff()
|
static byte[] |
toBytes(int x)
Converts an int to a byte[] . |
static byte[] |
toBytes(short x)
Converts a short to a byte[] . |
void |
toICQ(byte[] buffer)
Please document this. |
Methods inherited from class org.alicebot.server.net.listener.AliceChatListener |
---|
setParameter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.net.DatagramSocket socket
public static final java.lang.String label
Constructor Detail |
---|
public AliceICQ(Bot bot)
bot
- the bot for whom to listenMethod Detail |
---|
public boolean checkParameters()
AliceChatListener
checkParameters
in class AliceChatListener
true
if parameters are okay, false
if notpublic void run()
public void shutdown()
BotProcess
public void toICQ(byte[] buffer) throws java.io.IOException
java.io.IOException
public static byte[] toBytes(short x)
short
to a byte[]
.
x
- the short to convert
public static byte[] toBytes(int x)
int
to a byte[]
.
x
- the int to convert
public byte[] header(short command) throws java.io.IOException
java.io.IOException
public void ack(byte a, byte b) throws java.io.IOException
java.io.IOException
public void send(byte[] buffer) throws java.io.IOException
java.io.IOException
public void sendMesg(int to, java.lang.String mesg)
public void signoff()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |