|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectequip.net.ServerSap
The abstract class/interface for a Server SAP (Service Access Point), e.g. a TCP ServerSocket.
| Field Summary | |
protected int |
address
Socket IPv4 host address |
protected short |
port
Socket UDP/TCP port |
protected int |
status
Socket status cache |
| Constructor Summary | |
protected |
ServerSap()
Default constructor, only accessible to subclass |
| Method Summary | |
abstract ConnectionSap |
accept()
Accept an incoming connection, normally blocking |
abstract void |
close()
Close the server socket (no more connections) |
int |
getAddress()
Get server IP address, currently IPv4 as 32bit int |
short |
getPort()
Get server socket UDP/TCP port number |
abstract int |
getProtocol()
What protocol (from SapProtocol) |
int |
getStatus()
Current status; cached in field status |
static java.net.InetAddress |
rewriteLocalAddress(java.net.InetAddress addr)
chance to replace local socket ip address with something else, e.g. to deal with multi-home issues |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int address
protected short port
protected int status
| Constructor Detail |
protected ServerSap()
| Method Detail |
public short getPort()
public int getAddress()
public abstract int getProtocol()
SapProtocol)
public int getStatus()
status
public abstract ConnectionSap accept()
public abstract void close()
public static java.net.InetAddress rewriteLocalAddress(java.net.InetAddress addr)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||