|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.jetrix.services.AbstractService
net.jetrix.listeners.ClientListener
public abstract class ClientListener
Abstract Listener waiting for incomming clients.
| Field Summary | |
|---|---|
protected int |
port
|
| Fields inherited from class net.jetrix.services.AbstractService |
|---|
autoStart |
| Constructor Summary | |
|---|---|
ClientListener()
|
|
| Method Summary | |
|---|---|
abstract Client |
getClient(Socket socket)
Initialize a client from a socket. |
int |
getPort()
Return the listening port. |
boolean |
isRunning()
Tell if the service is currently running. |
void |
run()
Main loop waiting for clients and checking basic rules (nickname unicity, ban list, room left on the server). |
void |
setPort(int port)
Set the port used the next time the listener is started. |
void |
start()
Start the listener. |
void |
stop()
Stop the listener. |
String |
toString()
|
| Methods inherited from class net.jetrix.services.AbstractService |
|---|
isAutoStart, setAutoStart |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.jetrix.Listener |
|---|
getName |
| Methods inherited from interface net.jetrix.Service |
|---|
isAutoStart, setAutoStart |
| Field Detail |
|---|
protected int port
| Constructor Detail |
|---|
public ClientListener()
| Method Detail |
|---|
public abstract Client getClient(Socket socket)
throws Exception
Exceptionpublic final void run()
run in interface Runnablepublic int getPort()
Listener
getPort in interface Listenerpublic void setPort(int port)
Listener
setPort in interface Listenerpublic void start()
start in interface Listenerstart in interface Servicepublic void stop()
stop in interface Listenerstop in interface Servicepublic boolean isRunning()
Service
isRunning in interface Servicepublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||