|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread biz.chitec.quarterback.gjsa.server.GJSAServer biz.chitec.qdemo.chat.server.QJChatServer
A demonstrational GJSA server implementing a chat server. This server class tries to implement a minimalistic GJSA server with the minimal possible overhead. Look at the source code documentation to understand what is going on...
Nested Class Summary |
Nested classes inherited from class biz.chitec.quarterback.gjsa.server.GJSAServer |
GJSAServer.SocketListeningThread |
Field Summary | |
private Logger |
chatmessagelogger
Logger for the actual chat messages. |
private java.util.Map |
chatters
List of currently connected chatters |
static int |
DEFAULT_PORT
Standard port for this server. |
static java.lang.String |
FILEPATH
Path to send and receive files from and to |
Fields inherited from class biz.chitec.quarterback.gjsa.server.GJSAServer |
adminmsg, anyvalue, clie, clsupport, initialexecutoradder, logfilewriter, mainpl, mess, mykiller, objpl, objsslpl, port, secondarypl, serversocket, serverstatesymbols, serverthreadbases, sslavailable, sslpl, sti, utf8pl, utf8sslpl, vulture |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
QJChatServer(java.lang.String[] args)
Server constructor. |
Method Summary | |
void |
addChatter(java.lang.String chatter,
java.net.InetAddress clientaddress,
byte[] chaticon)
Insert a chatter into the global list. |
java.lang.String |
getAddon()
Gets the version addon attribute of the QJChatServer object. |
Logger |
getChatMessageLogger()
Gets the chatmessagelogger object of the QJChatServer. |
java.util.List |
getChatterList()
Method for obtaining all the chatters as a list. |
int |
getPatchLevel()
Gets the patchLevel attribute of the QJChatServer object. |
protected java.lang.String |
getSaveFileName()
Gets the name of the properties file. |
java.lang.String |
getServerName()
Return this server's name. |
int |
getSubVersion()
Gets the subVersion attribute of the QJChatServer object. |
int |
getVersion()
Gets the version attribute of the QJChatServer object. |
static void |
main(java.lang.String[] args)
The main program. |
void |
removeChatter(java.lang.String chatter)
Removes a chatter from the list. |
void |
sendChatMessage(java.lang.String chatter,
java.lang.String chatmessage,
java.util.List receiver,
byte[] chaticon)
Spread a chat message. |
protected void |
showHelp()
Show some help text. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, 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 |
Field Detail |
public static final java.lang.String FILEPATH
public static final int DEFAULT_PORT
private java.util.Map chatters
private Logger chatmessagelogger
Constructor Detail |
public QJChatServer(java.lang.String[] args)
args
- The command line parameters. Will be evaluated by the GJSA framework.Method Detail |
public java.lang.String getServerName()
getServerName
in class GJSAServer
public int getVersion()
getVersion
in class GJSAServer
public int getSubVersion()
getSubVersion
in class GJSAServer
public int getPatchLevel()
getPatchLevel
in class GJSAServer
public java.lang.String getAddon()
getAddon
in class GJSAServer
protected java.lang.String getSaveFileName()
getSaveFileName
in class GJSAServer
protected void showHelp()
showHelp
in class GJSAServer
public Logger getChatMessageLogger()
public void sendChatMessage(java.lang.String chatter, java.lang.String chatmessage, java.util.List receiver, byte[] chaticon)
chatter
- The chatter who issued this message.chatmessage
- The actual message to be broadcast.chaticon
- The adress to the chaticon.public void addChatter(java.lang.String chatter, java.net.InetAddress clientaddress, byte[] chaticon)
chatter
- The name of the chatter to be addedclientaddress
- Where does the chatter come fromchaticon
- The adress to the chaticonpublic void removeChatter(java.lang.String chatter)
chatter
- Description of the Parameterpublic java.util.List getChatterList()
public static void main(java.lang.String[] args)
args
- The command line arguments
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |