|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--keepalive.apps.App | +--keepalive.apps.Server
A Server application. Can run with simulated sockets or real TCP/IP sockets.
Constructor Summary | |
Server()
Run the application. |
Method Summary | |
protected void |
connect(AbstractSocket sock)
Using the socket, create Input and Output objects, hook the Input and Output objects into their UIs, start the Keep-Alive, and then wait for the Input/Output to finish (i.e. |
protected KeepAliveUI |
createUI()
Create the user interface. |
KeepAliveUI |
getKeepAliveUI()
Accessor method. |
Receiver |
getReceiver()
Accessor method. |
Sender |
getSender()
Accessor method. |
protected boolean |
isServerSide()
Indicates that this application is a server application. |
void |
listen()
Listen for incoming socket connections. |
static void |
main(java.lang.String[] args)
Run the Server application with real TCP/IP sockets. |
void |
run()
Listen for connections. |
protected void |
setKeepAliveUI(KeepAliveUI keepAliveUI)
Mutator method. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Server()
Method Detail |
protected KeepAliveUI createUI()
createUI
in class keepalive.apps.App
keepalive.apps.App
public void run()
run
in interface java.lang.Runnable
public void listen()
public java.lang.String toString()
toString
in class java.lang.Object
protected boolean isServerSide()
isServerSide
in class keepalive.apps.App
keepalive.apps.App
public static void main(java.lang.String[] args) throws java.io.IOException
args
- command line arguments; use -help to get usage description.java.io.IOException
- if an I/O error occurs in binding the ServerSocket.protected void connect(AbstractSocket sock)
sock
- Socket with which we connect to the other side.public Sender getSender()
public Receiver getReceiver()
protected void setKeepAliveUI(KeepAliveUI keepAliveUI)
keepAliveUI
- the user interface associated with this application.public KeepAliveUI getKeepAliveUI()
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |