TestServerStarter (OpenMap API)
Date: 2016-12-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.layer.link
Class TestServerStarter

    java.lang.Object
      com.bbn.openmap.layer.link.LinkServerStarter
          com.bbn.openmap.layer.link.TestServerStarter

    public class TestServerStarter

extends LinkServerStarter

The LinkServerStarter is the object that listens for Link clients on a specific port. If a Link client contacts it, it uses the LinkServerFactory 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() is the only thing youwould need to modify, to change the type of LinkServerFactory (and therefore, the LinkServer) used for the client.

Field Summary

Fields inherited from class com.bbn.openmap.layer.link.LinkServerStarter
`DEFAULT_PORT, serverPort`

Constructor Summary
`TestServerStarter(int port)` Starts the LinkServerStarter listening to the specified port.

Method Summary
`static void` | `main(java.lang.String[] argv)` Start up the server.
`java.lang.Thread` | `startNewServer(java.net.Socket socket)` From the LinkServerFactory interface, starts up a new LinkServer to handle a client.

Methods inherited from class com.bbn.openmap.layer.link.LinkServerStarter
`getPort, run, setPort`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TestServerStarter

    public TestServerStarter(int port)

  Starts the LinkServerStarter listening to the specified port.

Method Detail

### startNewServer

    public java.lang.Thread startNewServer(java.net.Socket socket)

  From the LinkServerFactory interface, starts up a new LinkServer to handle a client.

  Overrides:
    `startNewServer` in class `LinkServerStarter`
  Parameters:
    `socket` - socket to use to communicate to the client.
  Returns:
    a thread that will get started
  See Also:
    `Thread.start()`

### main

    public static void main(java.lang.String[] argv)

  Start up the server. This is the method to change if you want to customize how the LinkServer will handle clients - port, arguments, LinkServerFactory, etc.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details