|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--com.xfactorstudio.ahawasi.SocketService
The Socket Service
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
SocketService()
|
|
SocketService(XMLElement ConfXML,
Ahawasi server)
|
Method Summary | |
void |
addClient(ClientThread tempClient)
This method adds a new client Thread to the client list |
void |
close()
|
java.lang.String |
getApplicationVariable(java.lang.String varName)
return the application variable specified by the key |
java.util.Hashtable |
getApplicationVariables()
return the application variables Hashtable |
ClientThread |
getClient(long clientId)
|
ClientList |
getClientList()
return the current clientList |
int |
getMaxMessageSize()
return the maximum message size accepted This helps prevent attempts to crash the server. |
int |
getMaxUsers()
return the number of users allowed to access this service |
int |
getPort()
return the current port |
java.lang.String |
getServiceName()
|
void |
removeAllClients()
This method removes all clients |
void |
removeClient(ClientThread deadClient)
This method removes a dead connection from the client list |
void |
removeClient(long userId)
This method removes a dead connection from the client list |
void |
run()
|
void |
sendTo(java.lang.String message,
long to)
This method sends the specified user the private message |
void |
sendTo(java.lang.String message,
java.lang.String userName)
This method sends the specified user the private message |
void |
sendToAll(java.lang.String message)
This method loops through the client list for the specified room and send everyone the current message |
java.lang.String |
toXML()
|
java.lang.String |
toXMLDetailed()
|
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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 |
Constructor Detail |
public SocketService()
public SocketService(XMLElement ConfXML, Ahawasi server)
Method Detail |
public java.lang.String getServiceName()
public void close()
public void run()
run
in class java.lang.Thread
public int getPort()
public int getMaxUsers()
public int getMaxMessageSize()
public ClientList getClientList()
public void sendToAll(java.lang.String message)
public void addClient(ClientThread tempClient)
public void removeAllClients()
public void removeClient(ClientThread deadClient)
public void removeClient(long userId)
public void sendTo(java.lang.String message, long to)
public void sendTo(java.lang.String message, java.lang.String userName)
public java.util.Hashtable getApplicationVariables()
public java.lang.String getApplicationVariable(java.lang.String varName)
public ClientThread getClient(long clientId)
public java.lang.String toXML()
public java.lang.String toXMLDetailed()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |