Enum Class DittoConnectionType

java.lang.Object
java.lang.Enum<DittoConnectionType>
com.ditto.java.DittoConnectionType
All Implemented Interfaces:
Serializable, Comparable<DittoConnectionType>, Constable

public enum DittoConnectionType extends Enum<DittoConnectionType>

Represents the type of transport used for a DittoConnection between two DittoPeers.

This enum identifies the underlying network technology enabling peer-to-peer or client-server communication in the Ditto mesh network.

  • Enum Constant Details

    • BLUETOOTH

      public static final DittoConnectionType BLUETOOTH

      Bluetooth Low Energy transport.

      Local peer-to-peer connections using Bluetooth LE for short-range communication.

    • ACCESS_POINT

      public static final DittoConnectionType ACCESS_POINT

      Wi-Fi LAN transport.

      Connections over Wi-Fi infrastructure (access point/router) for local network communication.

    • P2PWIFI

      public static final DittoConnectionType P2PWIFI

      Peer-to-peer Wi-Fi transport.

      Direct peer-to-peer connections using either Wi-Fi Aware (NAN) or Wi-Fi Direct technologies, allowing devices to communicate without requiring a Wi-Fi access point.

    • WEBSOCKET

      public static final DittoConnectionType WEBSOCKET

      WebSocket connection to a remote server.

      Client-server connections using WebSocket protocol, typically to connect to a Ditto Big Peer or cloud-based sync server over the internet.

  • Method Details

    • values

      public static DittoConnectionType[] 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

      public static DittoConnectionType valueOf(String name)
      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 name
      NullPointerException - if the argument is null