Package org.briarproject.onionwrapper
Enum TorWrapper.TorState
- java.lang.Object
-
- java.lang.Enum<TorWrapper.TorState>
-
- org.briarproject.onionwrapper.TorWrapper.TorState
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<TorWrapper.TorState>
- Enclosing interface:
- TorWrapper
public static enum TorWrapper.TorState extends java.lang.Enum<TorWrapper.TorState>
The state of the Tor wrapper.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONNECTEDThe Tor process has started, its network connection is enabled, and it has connected to the Tor network.CONNECTINGThe Tor process has started, its network connection is enabled, and it is connecting (or reconnecting) to the Tor network.DISABLEDThe Tor process has started but its network connection is disabled.STARTING_STOPPINGThe Tor process is either starting or stopping.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TorWrapper.TorStatevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static TorWrapper.TorState[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STARTING_STOPPING
public static final TorWrapper.TorState STARTING_STOPPING
The Tor process is either starting or stopping.
-
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.
-
-
Method Detail
-
values
public static TorWrapper.TorState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TorWrapper.TorState c : TorWrapper.TorState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TorWrapper.TorState valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-