|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.abstracthorizon.danube.service.Service org.abstracthorizon.danube.service.server.ServerService
public abstract class ServerService
This abstract cass introduces port for potential socket to listen to and connection handler to be invoked with created connection.
Field Summary | |
---|---|
protected ConnectionHandler |
connectionHandler
Connection handler new connection to be handed to |
protected InetSocketAddress |
socketAddress
Socket address |
Fields inherited from class org.abstracthorizon.danube.service.Service |
---|
DESTROYED, INITIALIZED, listeners, logger, name, NOT_INITIALIZED, RUNNING, SERVICE_STATE_NAMES, STARTED, STOPPED, STOPPING, stopService |
Constructor Summary | |
---|---|
ServerService()
Default constructor |
Method Summary | |
---|---|
String |
getAddress()
|
ConnectionHandler |
getConnectionHandler()
Returns connection handler connections are handed to. |
int |
getPort()
Returns the port service is expecting connections on |
InetSocketAddress |
getSocketAddress()
|
void |
setAddress(String address)
|
void |
setConnectionHandler(ConnectionHandler connectionHandler)
Sets connection handler |
void |
setPort(int port)
Sets the port. |
void |
setSocketAddress(InetSocketAddress socketAddress)
|
Methods inherited from class org.abstracthorizon.danube.service.Service |
---|
addListener, changeState, create, destroy, getName, getState, getStateName, removeListener, setName, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.Runnable |
---|
run |
Field Detail |
---|
protected InetSocketAddress socketAddress
protected ConnectionHandler connectionHandler
Constructor Detail |
---|
public ServerService()
Method Detail |
---|
public int getPort()
public void setPort(int port)
Service.create()
method is called.
port
- the portpublic void setAddress(String address)
public String getAddress()
public void setSocketAddress(InetSocketAddress socketAddress)
public InetSocketAddress getSocketAddress()
public ConnectionHandler getConnectionHandler()
public void setConnectionHandler(ConnectionHandler connectionHandler)
connectionHandler
- connection handler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |