|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
mWokers.Server
public class Server
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
Server(int port,
boolean debug)
This is the constructor of class Server, which is primary responsible for listening for messages, and forwarding them. |
|
| Method Summary | |
|---|---|
java.lang.String |
getIPAdress()
|
int |
getPort()
|
boolean |
isConnected()
|
boolean |
isDebuged()
|
void |
run()
this is the thread-method which tries to read data from the "port" all the time. |
void |
sendFile(User reci,
User from,
java.io.File file)
this is the main file-sending method. |
void |
sendMessage(User reci,
User from,
java.lang.String msg)
this is the main message-sending method. |
void |
startIRC()
this method has got the purpose to start a new IRC-Server and connect to the irc-network! |
| 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 |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Server(int port,
boolean debug)
port - ... port on which the server will be listening for messagesdebug - ... debug level (can be true or false)| Method Detail |
|---|
public void startIRC()
public void sendMessage(User reci,
User from,
java.lang.String msg)
throws java.lang.Exception
reci - ... recipiant of the messagefrom - ... sender of the messagemsg - ... the message itself
java.lang.Exception
public void sendFile(User reci,
User from,
java.io.File file)
throws java.lang.Exception
reci - ... recipiant of the filefrom - ... sender of the filefile - ... the file itself
java.lang.Exceptionpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
public java.lang.String getIPAdress()
throws java.lang.Exception
java.lang.Exceptionpublic int getPort()
public boolean isDebuged()
public boolean isConnected()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||