Enum PacketError.Type

java.lang.Object
java.lang.Enum<PacketError.Type>
org.xmpp.packet.PacketError.Type
All Implemented Interfaces:
Serializable, Comparable<PacketError.Type>, java.lang.constant.Constable
Enclosing class:
PacketError

public static enum PacketError.Type extends Enum<PacketError.Type>
Error type. Valid types are: Implementation note: one of the XMPP error types is "continue". Because "continue" is a reserved Java keyword, the enum name is continue_processing. The toXMPP() and fromXMPP(String) methods can be used to convert between the enumertation values and XMPP error type strings.
  • Enum Constant Details

    • cancel

      public static final PacketError.Type cancel
      Do not retry (the error is unrecoverable).
    • continue_processing

      public static final PacketError.Type continue_processing
      Proceed (the condition was only a warning). This represents the "continue" error code in XMPP; because "continue" is a reserved keyword in Java the enum name has been changed.
    • modify

      public static final PacketError.Type modify
      Retry after changing the data sent.
    • auth

      public static final PacketError.Type auth
      Retry after providing credentials.
    • wait

      public static final PacketError.Type wait
      Retry after waiting (the error is temporary).
  • Method Details

    • values

      public static PacketError.Type[] 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 PacketError.Type 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
    • fromXMPP

      public static PacketError.Type fromXMPP(String type)
      Converts a String value into its Type representation.
      Parameters:
      type - the String value.
      Returns:
      the condition corresponding to the String.
    • toXMPP

      public String toXMPP()
      Returns the error code as a valid XMPP error code string.
      Returns:
      the XMPP error code value.