Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.4.3 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## org.xmpp.packet
Enum PacketError.Type

    java.lang.Object
      java.lang.Enum<PacketError.Type>
          org.xmpp.packet.PacketError.Type

All Implemented Interfaces:
  Serializable, Comparable<PacketError.Type>

Enclosing class:
  PacketError

    public static enum PacketError.Type

extends Enum<PacketError.Type>

Error type. Valid types are:

- `Error.Type.cancel` -- do not retry (the error is unrecoverable).
- `Error.Type.continue_processing` -- proceed (the condition was only a warning). Equivalent to the XMPP error type "continue".
- `Error.Type.modify` -- retry after changing the data sent.
- `Eror.Type.auth` -- retry after providing credentials.
- `Error.Type.wait` -- retry after waiting (the error is temporary).

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 Summary
`auth` Retry after providing credentials.
`cancel` Do not retry (the error is unrecoverable).
`continue_processing` Proceed (the condition was only a warning).
`modify` Retry after changing the data sent.
`wait` Retry after waiting (the error is temporary).

Method Summary
`static PacketError.Type` | `fromXMPP(String type)` Converts a String value into its Type representation.
`String` | `toXMPP()` Returns the error code as a valid XMPP error code string.
`static PacketError.Type` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static PacketError.Type[]` | `values()` Returns an array containing the constants of this enum type, in the order they're declared.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### 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 Detail

### values

    public static final PacketError.Type[] values()

  Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:

      for(PacketError.Type c : PacketError.Type.values())
              System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they're 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

### 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.4.3 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

Copyright © 2003-2007 Jive Software.