|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectproper.core.ProperObject
proper.core.ArgumentObject
proper.app.Application
proper.remote.Server
public abstract class Server
This abstract class contains some basic functionality for a server.
For a complete list of commandline parameters just run it with the option
"-help".
Field Summary | |
---|---|
static int |
ALIVE_CHECK
the interval in msec to check the alive status of the clients |
static int |
LIST_CLIENTS
the identifier for the clients |
static java.lang.String |
REQUEST_ISALIVE
with this request the we just send an empty message to the server (this can be used as a notification message) |
static java.lang.String |
REQUEST_NOP
with this request the we just send an empty message to the server (this can be used as a notification message) |
Fields inherited from interface proper.core.ProperInterface |
---|
VERSION |
Constructor Summary | |
---|---|
Server()
initializes the object |
Method Summary | |
---|---|
void |
addToAccessLog(java.lang.String msg)
adds the message to the access log |
void |
addToErrorLog(java.lang.String msg)
adds the message to the error log |
void |
checkClients()
checks all the clients in the list whether they are still alive, if not they are removed from the list |
Message |
createMessage()
creates a new Message with the IP and Port of the server |
Message |
createMessage(java.lang.String request)
creates a new Message with the IP and Port of the server and with the given Request |
ClientList |
getClientList(int type)
returns the specified clientlist |
java.lang.String |
getHostName()
returns the hostname of the server |
int |
getPort()
returns the port the server is listening to |
boolean |
isOperational()
this method determines whether the server should continue accepting connections or not |
Methods inherited from class proper.app.Application |
---|
checkCommandLine, createInstance, fromXML, parameterError, printDescription, printUsage, run, run, setArgs, setArgs, toString, toXML |
Methods inherited from class proper.core.ArgumentObject |
---|
fixAdditionalArg |
Methods inherited from class proper.core.ProperObject |
---|
addListener, addOutput, classInVerbose, debugprint, debugprint, debugprint, debugprint, debugprintln, debugprintln, debugprintln, debugprintln, debugprintln, getListeners, getRuntime, getVerbose, getVerboseLevel, getVerboseLevelForClass, getVerboseString, getVerboseStringForClass, notifyListener, notifyListeners, print, print, print, print, println, println, println, println, println, printMemory, removeListener, setOutput, setVerbose, setVerboseLevel, setVerboseString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String REQUEST_NOP
public static final java.lang.String REQUEST_ISALIVE
public static final int LIST_CLIENTS
public static final int ALIVE_CHECK
Constructor Detail |
---|
public Server()
Method Detail |
---|
public int getPort()
public java.lang.String getHostName()
public void addToErrorLog(java.lang.String msg)
public void addToAccessLog(java.lang.String msg)
public Message createMessage()
public Message createMessage(java.lang.String request)
public void checkClients()
public ClientList getClientList(int type)
public boolean isOperational()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |