# Enum TunnelStopReason

java.lang.Object
java.lang.Enum<TunnelStopReason>
com.codename1.vpn.tunnel.TunnelStopReason

All Implemented Interfaces:
  `Comparable<TunnelStopReason>`

public enum TunnelStopReason extends Enum<TunnelStopReason>

Why a tunnel stopped.

The ordinals cross the SPI boundary, so existing constants must not be reordered.

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `NETWORK_LOST`
  The device lost the network the tunnel was running over.
  `REQUESTED`
  The app asked for it.
  `SYSTEM_RECLAIMED`
  The system is reclaiming the tunnel's host, usually for memory.
  `UNKNOWN`
  Something else, or the platform did not say.
  `USER_DISABLED`
  The user turned the VPN off, in Settings or the system UI.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static TunnelStopReason`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static TunnelStopReason[]`
  `values()`
  Returns an array containing the constants of this enum type, in the order they are declared.

  ### Methods inherited from class Enum

  `clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf`

  ### Methods inherited from class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### REQUESTED

    public static final TunnelStopReason REQUESTED
    The app asked for it.

  - ### USER_DISABLED

    public static final TunnelStopReason USER_DISABLED
    The user turned the VPN off, in Settings or the system UI.

  - ### NETWORK_LOST

    public static final TunnelStopReason NETWORK_LOST
    The device lost the network the tunnel was running over.

  - ### SYSTEM_RECLAIMED

    public static final TunnelStopReason SYSTEM_RECLAIMED
    The system is reclaiming the tunnel's host, usually for memory.

  - ### UNKNOWN

    public static final TunnelStopReason UNKNOWN
    Something else, or the platform did not say.

- ## Method Details

  - ### values

    public static TunnelStopReason[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.
    Returns:
      an array containing the constants of this enum type, in the order they are declared

  - ### valueOf

    public static TunnelStopReason valueOf(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:
      `IllegalArgumentException` - if this enum type has no constant with the specified name
      `NullPointerException` - if the argument is null