Package 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).
continue_processing. ThetoXMPP()andfromXMPP(String)methods can be used to convert between the enumertation values and XMPP error type strings.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description authRetry after providing credentials.cancelDo not retry (the error is unrecoverable).continue_processingProceed (the condition was only a warning).modifyRetry after changing the data sent.waitRetry after waiting (the error is temporary).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PacketError.TypefromXMPP(String type)Converts a String value into its Type representation.StringtoXMPP()Returns the error code as a valid XMPP error code string.static PacketError.TypevalueOf(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 are declared.
-
-
-
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 PacketError.Type[] values()
Returns an array containing the constants of this enum type, in the order they are 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 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 nameNullPointerException- 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.
-
-