public interface Backend
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.String> |
getRunningTunnelNames()
Enumerate names of currently-running tunnels.
|
Tunnel.State |
getState(Tunnel tunnel)
Get the state of a tunnel.
|
Statistics |
getStatistics(Tunnel tunnel)
Get statistics about traffic and errors on this tunnel.
|
java.lang.String |
getVersion()
Determine version of underlying backend.
|
Tunnel.State |
setState(Tunnel tunnel,
Tunnel.State state,
Config config)
Set the state of a tunnel, updating it's configuration.
|
java.util.Set<java.lang.String> getRunningTunnelNames()
Tunnel.State getState(Tunnel tunnel) throws java.lang.Exception
tunnel
- The tunnel to examine the state of.java.lang.Exception
- Exception raised when retrieving tunnel's state.Statistics getStatistics(Tunnel tunnel) throws java.lang.Exception
tunnel
- The tunnel to retrieve statistics for.java.lang.Exception
- Exception raised when retrieving statistics.java.lang.String getVersion() throws java.lang.Exception
java.lang.Exception
- Exception raised while retrieving version.Tunnel.State setState(Tunnel tunnel, Tunnel.State state, @Nullable Config config) throws java.lang.Exception
tunnel
- The tunnel to control the state of.state
- The new state for this tunnel. Must be UP
, DOWN
, or
TOGGLE
.config
- The configuration for this tunnel, may be null if state is DOWN
.java.lang.Exception
- Exception raised while changing state.