|
|||||||||
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
Exception
public final void run()
run
in interface Runnable
public int getPort()
Listener
getPort
in interface Listener
public void setPort(int port)
Listener
setPort
in interface Listener
public void start()
start
in interface Listener
start
in interface Service
public void stop()
stop
in interface Listener
stop
in interface Service
public boolean isRunning()
Service
isRunning
in interface Service
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |