Package com.wireguard.android.backend
Interface Tunnel
-
public interface TunnelRepresents a WireGuard tunnel.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTunnel.StateEnum class to represent all possible states of aTunnel.
-
Field Summary
Fields Modifier and Type Field Description static intNAME_MAX_LENGTHstatic java.util.regex.PatternNAME_PATTERN
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetName()Get the name of the tunnel, which should always pass the !isNameInvalid test.static booleanisNameInvalid(java.lang.CharSequence name)voidonStateChange(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.
-
-