Enum Class TorWrapper.TorState

java.lang.Object
java.lang.Enum<TorWrapper.TorState>
org.briarproject.onionwrapper.TorWrapper.TorState
All Implemented Interfaces:
Serializable, Comparable<TorWrapper.TorState>, Constable
Enclosing interface:
TorWrapper

public static enum TorWrapper.TorState extends Enum<TorWrapper.TorState>
The state of the Tor wrapper.
  • Enum Constant Details

    • NOT_STARTED

      public static final TorWrapper.TorState NOT_STARTED
      The wrapper has been created but the TorWrapper.start() method has not yet been called. This is the initial state.
    • STARTING

      public static final TorWrapper.TorState STARTING
      The TorWrapper.start() method has been called and the Tor process is starting.
    • STARTED

      public static final TorWrapper.TorState STARTED
      The TorWrapper.start() method has been called and the Tor process has started.

      No connections to the Tor network will be made in this state. The wrapper remains in this state until TorWrapper.enableNetwork(boolean) is called.

    • CONNECTING

      public static final TorWrapper.TorState CONNECTING
      The Tor process has started, its network connection is enabled, and it is connecting (or reconnecting) to the Tor network.
    • CONNECTED

      public static final TorWrapper.TorState CONNECTED
      The Tor process has started, its network connection is enabled, and it has connected to the Tor network. In this state it should be possible to make connections via the SOCKS port.
    • DISABLED

      public static final TorWrapper.TorState DISABLED
      The Tor process has started but its network connection is disabled.
    • STOPPING

      public static final TorWrapper.TorState STOPPING
      The TorWrapper.stop() method has been called and the Tor process is stopping.
    • STOPPED

      public static final TorWrapper.TorState STOPPED
      The TorWrapper.stop() method has been called and the Tor process has stopped.

      A new Tor process can be started by calling the TorWrapper.start() method again.

  • Method Details

    • values

      public static TorWrapper.TorState[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TorWrapper.TorState valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null