Package com.wireguard.android.backend
Interface Tunnel
-
public interface Tunnel
Represents a WireGuard tunnel.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Tunnel.State
Enum class to represent all possible states of aTunnel
.
-
Field Summary
Fields Modifier and Type Field Description static int
NAME_MAX_LENGTH
static java.util.regex.Pattern
NAME_PATTERN
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getName()
Get the name of the tunnel, which should always pass the !isNameInvalid test.static boolean
isNameInvalid(java.lang.CharSequence name)
void
onStateChange(Tunnel.State newState)
React to a change in state of the tunnel.
-
-
-
Field Detail
-
NAME_MAX_LENGTH
static final int NAME_MAX_LENGTH
- See Also:
- Constant Field Values
-
NAME_PATTERN
static final java.util.regex.Pattern NAME_PATTERN
-
-
Method Detail
-
isNameInvalid
static boolean isNameInvalid(java.lang.CharSequence name)
-
getName
java.lang.String getName()
Get the name of the tunnel, which should always pass the !isNameInvalid test.- Returns:
- The name of the tunnel.
-
onStateChange
void onStateChange(Tunnel.State newState)
React to a change in state of the tunnel. Should only be directly called by Backend.- Parameters:
newState
- The new state of the tunnel.
-
-