public class LinkServerStarter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PORT
Default port that the server starter listens to.
|
protected int |
serverPort
The port being listened to.
|
Constructor and Description |
---|
LinkServerStarter()
Starts the LinkServerStarter listening to the default port.
|
LinkServerStarter(int port)
Starts the LinkServerStarter listening to the specified port.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public static final int DEFAULT_PORT
protected int serverPort
public LinkServerStarter()
public LinkServerStarter(int port)
public void setPort(int port)
public int getPort()
public void run()
public java.lang.Thread startNewServer(java.net.Socket sock)
sock
- the socket connectionThread.start()
public static void main(java.lang.String[] argv)
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details