|
Babylon Java Chat | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.lang.Thread
BabylonConnection
BabylonClientConnection
public class BabylonClientConnection
This class represents a user connection on the client side. All communication by the client is performed by this class.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected boolean |
stop
|
protected java.util.Vector |
userList
|
| Fields inherited from class BabylonConnection |
|---|
fileTransfers, imageTransfers, iStream, lastReceiveTime, lastSendTime, online, oStream, protocolVersion, socket, threadGroup, watchDog |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
BabylonClientConnection(java.net.Socket s,
BabylonPanel panel)
|
|
| Method Summary | |
|---|---|
protected void |
addToIgnored()
This routine will add the selected users from the user list to our list of ignored users. |
protected void |
addToIgnored(java.lang.String name)
Ignore a specific user. |
protected BabylonUser |
findUser(java.lang.String userName)
Find a user in the list based on their user name. |
protected void |
lostConnection()
|
void |
run()
|
protected void |
sendActivity(short activity)
This tells our selected recipients that we're in the middle of typing or drawing something. |
protected void |
sendAllowUser(int userId,
java.lang.String roomName)
Tell the server that we want to un-ban the user from the current chat room. |
protected void |
sendBanUser(int userId,
java.lang.String roomName)
Tell the server that we want to ban the user from the current chat room. |
protected void |
sendBootUser(int userId,
java.lang.String roomName)
Tell the server that we want to boot the user from the current chat room. |
protected void |
sendChatText(java.lang.String data)
This sends a line of chat text to the selected recipients. |
protected void |
sendClearCanv()
Sends the 'clear canvas' signal to the specified users. |
protected void |
sendDisconnect()
Tell the server that we're disconnecting. |
protected void |
sendDrawText(short colour,
short x,
short y,
short type,
short attribs,
short size,
java.lang.String text)
This sends graphic text to the selected recipients. |
protected void |
sendEnterRoom(java.lang.String roomName,
boolean priv,
java.lang.String password)
Tell the server that we want to join a different chat room. |
protected void |
sendError(short code,
int toId)
Sends the requested error advisory to the specified user. |
protected void |
sendFile(java.lang.String fileName,
long totalSize,
int totalBlocks,
int blockSize,
int expireMins)
This requests sending a file to the selected users. |
protected void |
sendFileAccept(int toId,
java.lang.String fileName,
boolean accept)
Tell the server whether or not we want to accept a file transfer initiated by a 'send file' request we've received. |
protected void |
sendFileBlock(java.lang.String fileName,
int blockNumber,
byte[] data)
Send the server a block of a file from a file transfer initiated by a 'send file' request. |
protected void |
sendInstantMess(int toId,
java.lang.String message)
Sends an instant message to the server for the specified user. |
protected void |
sendInvite(int userId,
java.lang.String roomName)
Tell the server that we want to invite a user into our chat room. |
protected void |
sendLeaveMess(java.lang.String toName,
java.lang.String message)
Sends our message to the server for the specified user. |
protected void |
sendLine(short colour,
short startX,
short startY,
short endX,
short endY,
short thick)
This sends a graphic line to the selected recipients |
protected void |
sendPageUser()
Sends the paging signal to the specified users. |
protected void |
sendPoly(short kind,
short colour,
short x,
short y,
short width,
short height,
short thick,
boolean fill)
This sends a graphic polygon to the selected recipients. |
protected void |
sendReadMess()
Sends a request to the server to retrieve our stored messages. |
protected void |
sendRoomList()
This will ask the server to send us a list of the current chat rooms. |
protected void |
sendSendEmail(java.lang.String fromAddress,
java.lang.String toAddress,
java.lang.String subject,
java.lang.String text)
Sends a 'send email' request to the server with the supplied parameters and data. |
protected void |
shutdown(boolean notifyUser)
|
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Vector userList
protected boolean stop
| Constructor Detail |
|---|
public BabylonClientConnection(java.net.Socket s,
BabylonPanel panel)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablerun in class BabylonConnectionprotected BabylonUser findUser(java.lang.String userName)
protected void addToIgnored(java.lang.String name)
protected void addToIgnored()
protected void sendDisconnect()
protected void sendRoomList()
protected void sendInvite(int userId,
java.lang.String roomName)
protected void sendEnterRoom(java.lang.String roomName,
boolean priv,
java.lang.String password)
protected void sendBootUser(int userId,
java.lang.String roomName)
protected void sendBanUser(int userId,
java.lang.String roomName)
protected void sendAllowUser(int userId,
java.lang.String roomName)
protected void sendActivity(short activity)
protected void sendChatText(java.lang.String data)
protected void sendLine(short colour,
short startX,
short startY,
short endX,
short endY,
short thick)
protected void sendPoly(short kind,
short colour,
short x,
short y,
short width,
short height,
short thick,
boolean fill)
protected void sendDrawText(short colour,
short x,
short y,
short type,
short attribs,
short size,
java.lang.String text)
protected void sendClearCanv()
protected void sendPageUser()
protected void sendInstantMess(int toId,
java.lang.String message)
protected void sendLeaveMess(java.lang.String toName,
java.lang.String message)
protected void sendReadMess()
protected void sendError(short code,
int toId)
protected void sendSendEmail(java.lang.String fromAddress,
java.lang.String toAddress,
java.lang.String subject,
java.lang.String text)
protected void sendFile(java.lang.String fileName,
long totalSize,
int totalBlocks,
int blockSize,
int expireMins)
protected void sendFileAccept(int toId,
java.lang.String fileName,
boolean accept)
protected void sendFileBlock(java.lang.String fileName,
int blockNumber,
byte[] data)
protected void lostConnection()
lostConnection in class BabylonConnectionprotected void shutdown(boolean notifyUser)
|
Babylon Java Chat | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||