|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.anotheria.net.shared.server.AbstractServer
public abstract class AbstractServer
Base class for all different kinds of servers
| Constructor Summary | |
|---|---|
protected |
AbstractServer()
Creates a new server |
protected |
AbstractServer(IConnectionFactory aConnectionFactory)
Creates a new server with specified connection factory. |
| Method Summary | |
|---|---|
void |
addServerListener(IServerListener listener)
Adds a listener to this server |
IConnectionFactory |
getConnectionFactory()
Returns the connection factory |
protected void |
notifyConnectionCreated(IConnection con)
Calls the connectionCreated method in all listeners |
protected void |
notifyConnectionRemoved(IConnection con)
Calls the connectionRemoved method in all listeners |
void |
removeServerListener(IServerListener listener)
Removes a listener from this server. |
void |
setConnectionFactory(IConnectionFactory connectionFactory)
Sets a new connection factory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.anotheria.net.shared.server.IServer |
|---|
startServer, stopServer |
| Constructor Detail |
|---|
protected AbstractServer()
protected AbstractServer(IConnectionFactory aConnectionFactory)
aConnectionFactory - the connection factor to use for incoming connections| Method Detail |
|---|
public void addServerListener(IServerListener listener)
IServer
addServerListener in interface IServerlistener - listener to addpublic void removeServerListener(IServerListener listener)
IServer
removeServerListener in interface IServerlistener - listener to removeprotected void notifyConnectionCreated(IConnection con)
con - the newly created connectionprotected void notifyConnectionRemoved(IConnection con)
con - the removed connectionpublic IConnectionFactory getConnectionFactory()
public void setConnectionFactory(IConnectionFactory connectionFactory)
connectionFactory - connection factory to use for new incoming connections
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||