tigase.xmpp
Enum Authorization

java.lang.Object
  extended by java.lang.Enum<Authorization>
      extended by tigase.xmpp.Authorization
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Authorization>

public enum Authorization
extends java.lang.Enum<Authorization>

Authorization enumeration type defines authorization error codes. It has also capability to build error response message relevant to specific error code (or success code). It is used not only for authorization process but also by other features implementation accessing session data.
All defined errors comes directly from XMPP core RFC. For each error has assigned error code - from old Jabber spec. and error condition - XMPP error spec.

Created: Thu Oct 14 22:19:11 2004

Version:
$Rev: 690 $
Author:
Artur Hefczyc

Enum Constant Summary
AUTHORIZED
           
BAD_REQUEST
           
CONFLICT
           
FEATURE_NOT_IMPLEMENTED
           
FORBIDDEN
           
GONE
           
INTERNAL_SERVER_ERROR
           
ITEM_NOT_FOUND
           
JID_MALFORMED
           
NOT_ACCEPTABLE
           
NOT_ALLOWED
           
NOT_AUTHORIZED
           
PAYMENT_REQUIRED
           
RECIPIENT_UNAVAILABLE
           
REDIRECT
           
REGISTRATION_REQUIRED
           
REMOTE_SERVER_NOT_FOUND
           
REMOTE_SERVER_TIMEOUT
           
RESOURCE_CONSTRAINT
           
SERVICE_UNAVAILABLE
           
SUBSCRIPTION_REQUIRED
           
UNDEFINED_CONDITION
           
UNEXPECTED_REQUEST
           
 
Field Summary
protected static java.lang.String ERR_TYPE_AUTH
           
protected static java.lang.String ERR_TYPE_CANCEL
           
protected static java.lang.String ERR_TYPE_MODIFY
           
protected static java.lang.String ERR_TYPE_WAIT
           
 
Method Summary
abstract  java.lang.String getCondition()
           
abstract  int getErrorCode()
           
abstract  java.lang.String getErrorType()
           
 Packet getResponseMessage(Packet p, java.lang.String text, boolean includeOriginalXML)
           
static Authorization valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Authorization[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

AUTHORIZED

public static final Authorization AUTHORIZED

BAD_REQUEST

public static final Authorization BAD_REQUEST

CONFLICT

public static final Authorization CONFLICT

FEATURE_NOT_IMPLEMENTED

public static final Authorization FEATURE_NOT_IMPLEMENTED

FORBIDDEN

public static final Authorization FORBIDDEN

GONE

public static final Authorization GONE

INTERNAL_SERVER_ERROR

public static final Authorization INTERNAL_SERVER_ERROR

ITEM_NOT_FOUND

public static final Authorization ITEM_NOT_FOUND

JID_MALFORMED

public static final Authorization JID_MALFORMED

NOT_ACCEPTABLE

public static final Authorization NOT_ACCEPTABLE

NOT_ALLOWED

public static final Authorization NOT_ALLOWED

NOT_AUTHORIZED

public static final Authorization NOT_AUTHORIZED

PAYMENT_REQUIRED

public static final Authorization PAYMENT_REQUIRED

RECIPIENT_UNAVAILABLE

public static final Authorization RECIPIENT_UNAVAILABLE

REDIRECT

public static final Authorization REDIRECT

REGISTRATION_REQUIRED

public static final Authorization REGISTRATION_REQUIRED

REMOTE_SERVER_NOT_FOUND

public static final Authorization REMOTE_SERVER_NOT_FOUND

REMOTE_SERVER_TIMEOUT

public static final Authorization REMOTE_SERVER_TIMEOUT

RESOURCE_CONSTRAINT

public static final Authorization RESOURCE_CONSTRAINT

SERVICE_UNAVAILABLE

public static final Authorization SERVICE_UNAVAILABLE

SUBSCRIPTION_REQUIRED

public static final Authorization SUBSCRIPTION_REQUIRED

UNDEFINED_CONDITION

public static final Authorization UNDEFINED_CONDITION

UNEXPECTED_REQUEST

public static final Authorization UNEXPECTED_REQUEST
Field Detail

ERR_TYPE_MODIFY

protected static final java.lang.String ERR_TYPE_MODIFY
See Also:
Constant Field Values

ERR_TYPE_CANCEL

protected static final java.lang.String ERR_TYPE_CANCEL
See Also:
Constant Field Values

ERR_TYPE_AUTH

protected static final java.lang.String ERR_TYPE_AUTH
See Also:
Constant Field Values

ERR_TYPE_WAIT

protected static final java.lang.String ERR_TYPE_WAIT
See Also:
Constant Field Values
Method Detail

values

public static Authorization[] 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 (Authorization c : Authorization.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Authorization valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getCondition

public abstract java.lang.String getCondition()

getErrorCode

public abstract int getErrorCode()

getErrorType

public abstract java.lang.String getErrorType()

getResponseMessage

public Packet getResponseMessage(Packet p,
                                 java.lang.String text,
                                 boolean includeOriginalXML)
                          throws PacketErrorTypeException
Throws:
PacketErrorTypeException


Copyright © 2008 Tigase. All Rights Reserved.