|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.layer.link.LinkServerStarter
public class LinkServerStarter
The LinkServerStarter is the object that listens for Link clients on a specific port. If a Link client contacts it, it uses the startNewServer method to create a LinkServer to serve the client on it's own thread. If you want to create a new type of LinkServer, you should also create a new LinkServerStarter to launch it properly. Generally, the main() and startNewServer() methods are the only thing you would need to modify.
Field Summary | |
---|---|
static int |
DEFAULT_PORT
Default port that the server starter listens to. |
protected int |
serverPort
The port being listened to. |
Constructor Summary | |
---|---|
LinkServerStarter()
Starts the LinkServerStarter listening to the default port. |
|
LinkServerStarter(int port)
Starts the LinkServerStarter listening to the specified port. |
Method Summary | |
---|---|
int |
getPort()
Get the port that is being listened to. |
static void |
main(java.lang.String[] argv)
Start up the server. |
void |
run()
The method of the parent server that is listening for clients. |
void |
setPort(int port)
Set the port to listen for a connection request. |
java.lang.Thread |
startNewServer(java.net.Socket sock)
This method gets called to create a new server to handle a new connection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_PORT
protected int serverPort
Constructor Detail |
---|
public LinkServerStarter()
public LinkServerStarter(int port)
Method Detail |
---|
public void setPort(int port)
public int getPort()
public void run()
public java.lang.Thread startNewServer(java.net.Socket sock)
sock
- the socket connection
Thread.start()
public static void main(java.lang.String[] argv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |