edu.internet2.ndt

## Class OsfwWorker

- java.lang.Object
- - edu.internet2.ndt.OsfwWorker

- All Implemented Interfaces:
    Runnable

      public class OsfwWorker
      extends Object
      implements Runnable

  OsfwWorker creates a thread that listens for a message from the server. It functions to check if the server has sent a message that is valid and sufficient to determine if the server->client direction has a fire-wall.

  As part of the simple firewall test, the Server must try to connect to the Client's ephemeral port and send a TEST_MSG message containing a pre-defined string "Simple firewall test" of 20 chars using this newly created connection. This class implements this functionality.

  The result of the test is set back into the Tcpbw100._iS2cSFWResult variable (using setter methods) for the test results to be interpreted later.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OsfwWorker(ServerSocket srvSocketParam, int iParamTestTime)` Constructor
    `OsfwWorker(ServerSocket srvSocketParam, int iParamTestTime, Tcpbw100 _localParam)` Constructor accepting Tcpbw100 parameter

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `run()` run() method of this SFW Worker thread.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### OsfwWorker

          OsfwWorker(ServerSocket srvSocketParam,
                     int iParamTestTime)

      Constructor
      Parameters:
        `srvSocketParam` - Socket used to transmit protocol messages
        `iParamTestTime` - Test time duration to wait for message from server

    - #### OsfwWorker

          OsfwWorker(ServerSocket srvSocketParam,
                     int iParamTestTime,
                     Tcpbw100 _localParam)

      Constructor accepting Tcpbw100 parameter
      Parameters:
        `srvSocketParam` - Socket on which to accept connections
        `iParamTestTime` - Test time duration to wait for message from server
        `_localParam` - Applet object used to set the result of the S->C firewall test

  - ### Method Detail

    - #### run

          public void run()

      run() method of this SFW Worker thread. This thread listens on the socket from the server for a given time period, and checks to see if the server has sent a message that is valid and sufficient to determine if the S->C direction has a fire-wall.
      Specified by:
        `run` in interface `Runnable`