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

    java.lang.Object
      java.lang.Thread
          com.bbn.openmap.layer.link.LinkServer
              com.bbn.openmap.layer.link.TestLinkServer

All Implemented Interfaces:
  LinkActionConstants, LinkPropertiesConstants, java.lang.Runnable

public class TestLinkServer
extends LinkServer
implements LinkActionConstants, LinkPropertiesConstants

The TestLinkServer is my test implementation of a customized LinkServer.

Field Summary

Fields inherited from class com.bbn.openmap.layer.link.LinkServer
`link`

Fields inherited from class java.lang.Thread
`MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

Fields inherited from interface com.bbn.openmap.layer.link.LinkActionConstants

`ACTION_GRAPHICS, ACTION_GUI, ACTION_MAP, CLIENT_NOTIFICATION_MASK, GRAPHIC_ID_MASK, KEY_PRESSED_MASK, KEY_RELEASED_MASK, MODIFY_DELETE_GRAPHIC_MASK, MODIFY_DESELECT_GRAPHIC_MASK, MODIFY_DESELECTALL_GRAPHIC_MASK, MODIFY_LOWER_GRAPHIC_MASK, MODIFY_RAISE_GRAPHIC_MASK, MODIFY_SELECT_GRAPHIC_MASK, MOUSE_CLICKED_MASK, MOUSE_DRAGGED_MASK, MOUSE_ENTERED_MASK, MOUSE_EXITED_MASK, MOUSE_MOVED_MASK, MOUSE_PRESSED_MASK, MOUSE_RELEASED_MASK, SERVER_NOTIFICATION_MASK, UPDATE_ADD_GRAPHIC_MASK, UPDATE_GRAPHIC_MASK`

Fields inherited from interface com.bbn.openmap.layer.link.LinkPropertiesConstants

`LPC_BACKWARD_DIAG_PATTERN, LPC_CENTER_LAT, LPC_CENTER_LONG, LPC_CLEAR_PROPERTIES, LPC_CLEAR_PROPERTIES_CHAR, LPC_CROSS_PATTERN, LPC_DASH, LPC_DASH_DOT, LPC_DASH_DOT_DOT, LPC_DIAG_CROSS_PATTERN, LPC_DOT, LPC_FILLCOLOR, LPC_FILLPATTERN, LPC_FORWARD_DIAG_PATTERN, LPC_GRAPHICID, LPC_HEIGHT, LPC_HIGHLIGHTCOLOR, LPC_HORIZONTAL_PATTERN, LPC_HTML, LPC_INFO, LPC_LATMAX, LPC_LATMIN, LPC_LINECOLOR, LPC_LINESTYLE, LPC_LINEWIDTH, LPC_LINKRASTERIMAGEURL, LPC_LINKROTATION, LPC_LINKTEXTBASELINE, LPC_LINKTEXTFONT, LPC_LINKTEXTSTRING, LPC_LONG_DASH, LPC_LONMAX, LPC_LONMIN, LPC_MESSAGE, LPC_OLD_FILLCOLOR, LPC_OLD_FILLPATTERN, LPC_OLD_HIGHLIGHTCOLOR, LPC_OLD_LINECOLOR, LPC_OLD_LINESTYLE, LPC_OLD_LINEWIDTH, LPC_OLD_LINKTEXTFONT, LPC_OLD_LINKTEXTSTRING, LPC_PROJECTION, LPC_PROPERY_MANAGEMENT_POLICY, LPC_PROPERY_MANAGEMENT_POLICY_CHAR, LPC_REUSE_PROPERTIES, LPC_REUSE_PROPERTIES_CHAR, LPC_SCALE, LPC_SOLID, LPC_SOLID_PATTERN, LPC_TIME, LPC_URL, LPC_VERTICAL_PATTERN, LPC_WIDTH`

Constructor Summary
`TestLinkServer(java.net.Socket s)` Create child thread that will handle the client.

Method Summary
`void` `getRectangle(LinkMapRequest query, Link link)` An example of how to handle GraphicsLinkQueries.
`void` `handleClient()` handleClient is a method that listens to the link to a client, and responds to requests that are made.
`void` `handleGesture(LinkActionRequest glq, Link link)` An example of how to handle LinkActionRequest.

Methods inherited from class com.bbn.openmap.layer.link.LinkServer
`huh, run`

Methods inherited from class java.lang.Thread
`activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield`

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

Constructor Detail

### TestLinkServer

    public TestLinkServer(java.net.Socket s)

  Create child thread that will handle the client.

Parameters:
  `s` - the socket to communicate over.

Method Detail

### handleClient

    public void handleClient()
                      throws java.io.IOException

  handleClient is a method that listens to the link to a client, and responds to requests that are made.

  Overrides:
    `handleClient` in class `LinkServer`
  Throws:
    `java.io.IOException`

### getRectangle

    public void getRectangle(LinkMapRequest query,
                             Link link)
                      throws java.io.IOException

  An example of how to handle GraphicsLinkQueries.

  Overrides:
    `getRectangle` in class `LinkServer`
  Parameters:
    `query` - the GraphicsLinkQuery, so you can get more information about the parameters of the map screen of the client.
    `link` - the link to communicate the response back to the client.
  Throws:
    `java.io.IOException`

### handleGesture

    public void handleGesture(LinkActionRequest glq,
                              Link link)
                       throws java.io.IOException

  An example of how to handle LinkActionRequest.

  Overrides:
    `handleGesture` in class `LinkServer`
  Parameters:
    `glq` - the LinkActionRequest, so you can get more information about the parameters of the gesture frome the client.
    `link` - the link to communicate the response back to the client.
  Throws:
    `java.io.IOException`

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