Enum Class TransmissionType

java.lang.Object
java.lang.Enum<TransmissionType>
org.refcodes.serial.ext.handshake.TransmissionType
All Implemented Interfaces:
Serializable, Comparable<TransmissionType>, Constable

public enum TransmissionType extends Enum<TransmissionType>
The TransmissionType defines the type of a TransmissionMessage and therewith the mode of operation of a transmission process.
  • Enum Constant Details

    • TRANSMISSION

      public static final TransmissionType TRANSMISSION
      Identifies a fire-and-forget transmission (no acknowledge sent).
    • REQUEST

      public static final TransmissionType REQUEST
      Identifies a request expecting a fire-and-forget response (no acknowledge to be sent for the succeeding response).
    • RESPONSE

      public static final TransmissionType RESPONSE
      Identifies a fire-and-forget response in reply to a request (no acknowledge to be sent for the response).
    • ACKNOWLEDGEABLE_TRANSMISSION

      public static final TransmissionType ACKNOWLEDGEABLE_TRANSMISSION
      Identifies an acknowledgeable transmission (acknowledge to be sent).
    • ACKNOWLEDGEABLE_REQUEST

      public static final TransmissionType ACKNOWLEDGEABLE_REQUEST
      Identifies a request expecting an acknowledgeable response (acknowledge to be sent sent for the succeeding response).
    • ACKNOWLEDGEABLE_RESPONSE

      public static final TransmissionType ACKNOWLEDGEABLE_RESPONSE
      Identifies an acknowledgeable response in reply to a request (acknowledge to be sent for the response).
    • PING

      public static final TransmissionType PING
      Identifies a simple ping request to be responded by a fire-and-forget pong (not to be acknowledged).
  • Method Details

    • values

      public static TransmissionType[] 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 TransmissionType 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
    • isAcknowledgeable

      public boolean isAcknowledgeable()
      Determines whether the TransmissionType expects an acknowledge.
      Returns:
      True in case an acknowledge is expected, else false.