Package org.briarproject.onionwrapper
Enum Class TorWrapper.TorState
- All Implemented Interfaces:
Serializable,Comparable<TorWrapper.TorState>,Constable
- Enclosing interface:
- TorWrapper
The state of the Tor wrapper.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe Tor process has started, its network connection is enabled, and it has connected to the Tor network.The Tor process has started, its network connection is enabled, and it is connecting (or reconnecting) to the Tor network.The Tor process has started but its network connection is disabled.The wrapper has been created but theTorWrapper.start()method has not yet been called.TheTorWrapper.start()method has been called and the Tor process has started.TheTorWrapper.start()method has been called and the Tor process is starting.TheTorWrapper.stop()method has been called and the Tor process has stopped.TheTorWrapper.stop()method has been called and the Tor process is stopping. -
Method Summary
Modifier and TypeMethodDescriptionstatic TorWrapper.TorStateReturns the enum constant of this class with the specified name.static TorWrapper.TorState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NOT_STARTED
The wrapper has been created but theTorWrapper.start()method has not yet been called. This is the initial state. -
STARTING
TheTorWrapper.start()method has been called and the Tor process is starting. -
STARTED
TheTorWrapper.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
The Tor process has started, its network connection is enabled, and it is connecting (or reconnecting) to the Tor network. -
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
The Tor process has started but its network connection is disabled. -
STOPPING
TheTorWrapper.stop()method has been called and the Tor process is stopping. -
STOPPED
TheTorWrapper.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
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
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 nameNullPointerException- if the argument is null
-