ClientProcess (SelekTOR Java Documentation)
Date: 2018-05-25

lib

## Class ClientProcess

- java.lang.Object
- - lib.ClientProcess

- Direct Known Subclasses:
    TorProcess

      public class ClientProcess
      extends java.lang.Object

  Author:
    Alistair Neil

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `CLIENT_RUNNING`
    `static int` | `CLIENT_STOPPED`
    `static int` | `CLIENT_TIMEDOUT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientProcess()` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clientProcessEventFired(java.lang.String data)` Event from the process, should be overriden by sub class
    `int` | `getClientStatus()`
    `java.lang.Process` | `getProcess()` Return the client system process
    `void` | `sendMessage(java.lang.String message)` Send a message to the process
    `void` | `setStartupDelay(long ms)` Set the initial delay that is executed prior to starting the process
    `void` | `setStartupTimeout(long seconds)` Set startup timeout
    `void` | `start(java.lang.String processpath)` Starts the client process
    `void` | `stopProcess()` Stops the client process

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

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

- - ### Field Detail

    - #### CLIENT_STOPPED

          public static final int CLIENT_STOPPED

      See Also:
        Constant Field Values

    - #### CLIENT_RUNNING

          public static final int CLIENT_RUNNING

      See Also:
        Constant Field Values

    - #### CLIENT_TIMEDOUT

          public static final int CLIENT_TIMEDOUT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ClientProcess

          public ClientProcess()

      Constructor

  - ### Method Detail

    - #### setStartupDelay

          public final void setStartupDelay(long ms)

      Set the initial delay that is executed prior to starting the process
      Parameters:
        `ms` -

    - #### setStartupTimeout

          public final void setStartupTimeout(long seconds)

      Set startup timeout
      Parameters:
        `seconds` -

    - #### start

          public final void start(java.lang.String processpath)

      Starts the client process
      Parameters:
        `processpath` -

    - #### getClientStatus

          public final int getClientStatus()

    - #### getProcess

          public final java.lang.Process getProcess()

      Return the client system process
      Returns:
        a process

    - #### stopProcess

          public final void stopProcess()

      Stops the client process

    - #### sendMessage

          public final void sendMessage(java.lang.String message)

      Send a message to the process
      Parameters:
        `message` -

    - #### clientProcessEventFired

          public void clientProcessEventFired(java.lang.String data)

      Event from the process, should be overriden by sub class
      Parameters:
        `data` -