Enum Class WfMessageType

java.lang.Object
java.lang.Enum<WfMessageType>
org.whiteflagprotocol.java.core.WfMessageType
All Implemented Interfaces:
Serializable, Comparable<WfMessageType>, Constable

public enum WfMessageType extends Enum<WfMessageType>
Whiteflag message type

This enumerable class implements the message types as defined in the Whiteflag standard.

Since:
1.0
Whiteflag version:
v1-draft.6
Whiteflag standard x-reference:
2.4.2 Message Functionality
  • Enum Constant Details

    • ANY

      public static final WfMessageType ANY
      Undefined message type
    • A

      public static final WfMessageType A
      Authentication message type

      Message introducing the sender on the network with the sender’s authentication data

      Whiteflag standard x-reference:
      4.3.4 Management Messages: Authentication
    • K

      public static final WfMessageType K
      Cryptographic message type

      Message for management of keys and parameters of cryptographic functions

      Whiteflag standard x-reference:
      4.3.5 Management Messages: Cryptographic Support
    • T

      public static final WfMessageType T
      Test message type

      Message that can be used for testing Whiteflag functionality by applications

      Whiteflag standard x-reference:
      4.3.6 Management Messages: Test
    • R

      public static final WfMessageType R
      Resource message type

      Message to point to an internet resource

      Whiteflag standard x-reference:
      4.3.2 Functional Messages: Resource
    • F

      public static final WfMessageType F
      Free Text message type

      Message to send a free text string

      Whiteflag standard x-reference:
      4.3.3 Functional Messages: Free Text
    • P

      public static final WfMessageType P
      Protective Sign message type

      Sign to mark objects under the protection of international law

      Whiteflag standard x-reference:
      4.3.1 Functional Messages: Signs/Signals, 4.3.1.2.1 Protective Signs
    • E

      public static final WfMessageType E
      Emergency Signal message type

      Signal to send an emergency signal when in need of assistance

      Whiteflag standard x-reference:
      4.3.1 Functional Messages: Signs/Signals, 4.3.1.2.2 Emergency Signals
    • D

      public static final WfMessageType D
      Danger Sign message type

      Sign to mark a location or area of imminent danger, e.g. an area under attack, land mines, disaster, etc.

      Whiteflag standard x-reference:
      4.3.1 Functional Messages: Signs/Signals, 4.3.1.2.3 Danger and Disaster Signs
    • S

      public static final WfMessageType S
      Status Signal message type

      Signal to provide the status of an object, or specifically for persons: give a proof of life

      Whiteflag standard x-reference:
      4.3.1 Functional Messages: Signs/Signals, 4.3.1.2.4 Status Signals
    • I

      public static final WfMessageType I
      Infrastructure Sign message type

      Sign to mark critical infrastructure, e.g. roads, utilities, water treatment, hospitals, power plants etc.

      Whiteflag standard x-reference:
      4.3.1 Functional Messages: Signs/Signals, 4.3.1.2.5 Infrastructure Signs
    • M

      public static final WfMessageType M
      Mission Signal message type

      Signal to provide information on activities undertaken during a mission

      Whiteflag standard x-reference:
      4.3.1 Functional Messages: Signs/Signals, 4.3.1.2.6 Mission Signals
    • Q

      public static final WfMessageType Q
      Request Signal message type

      Signal to perform requests to other parties

      Whiteflag standard x-reference:
      4.3.1 Functional Messages: Signs/Signals, 4.3.1.2.7 Request Signals
  • Method Details

    • values

      public static WfMessageType[] 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 WfMessageType 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
    • getCode

      public final String getCode()
      Returns the message code string
      Returns:
      the message code
    • getHeaderFields

      public final WfMessageField[] getHeaderFields()
      Returns an array with the header fields
      Returns:
      an array of the fields from the message header
      Whiteflag version:
      v1-draft.6
      Whiteflag standard x-reference:
      4.2.1 Generic Message Header
    • getUnencryptedHeaderFields

      public final WfMessageField[] getUnencryptedHeaderFields()
      Returns an array with the header fields that are never encrypted
      Returns:
      an array of the fields from the message header
      Since:
      1.1
      Whiteflag version:
      v1-draft.6
      Whiteflag standard x-reference:
      4.2.1 Generic Message Header, 4.1.4 Encryption
    • getBodyFields

      public final WfMessageField[] getBodyFields()
      Returns an array with the body fields
      Returns:
      an array with the fields from the message body
    • createRequestFields

      public final WfMessageField[] createRequestFields(int n)
      Returns an array with additional Whiteflag sign/signal message body request fields
      Parameters:
      n - the number of request objects
      Returns:
      an array with the request message fields
      Whiteflag version:
      v1-draft.6
      Whiteflag standard x-reference:
      4.3.1.9 Object Request Fields
    • fromCode

      public static final WfMessageType fromCode(String messageCode) throws WfCoreException
      Creates the message type from the message code
      Parameters:
      messageCode - the message code
      Returns:
      the requested message type
      Throws:
      WfCoreException - if the message type is invalid
      Since:
      1.1