net.handle.hdllib
Class HandleException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by net.handle.hdllib.HandleException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
TrustException

public class HandleException
extends java.lang.Exception

See Also:
Serialized Form

Field Summary
static int CANNOT_CONNECT_TO_SERVER
           
static int CONFIGURATION_ERROR
           
static int DUPLICATE_SESSION_COUNTER
           
static int ENCRYPTION_ERROR
           
static int GOT_EXPIRED_MESSAGE
           
static int HANDLE_ALREADY_EXISTS
           
static int HANDLE_DOES_NOT_EXIST
           
static int INCOMPLETE_SESSIONSETUP
           
static int INTERNAL_ERROR
           
static int INVALID_SESSION_EXCHANGE_PRIVKEY
           
static int INVALID_VALUE
           
static int MESSAGE_FORMAT_ERROR
           
static int MISSING_CRYPTO_PROVIDER
           
static int MISSING_OR_INVALID_SIGNATURE
           
static int NEED_PUBLICKEY_FOR_SESSIONIDENTITY
           
static int NEED_RSAKEY_FOR_SESSIONEXCHANGE
           
static int NO_ACCEPTABLE_INTERFACES
           
static int OTHER_CONNECTION_ESTABLISHED
           
static java.lang.String OTHER_CONNECTION_ESTABLISHED_STRING
           
static int REPLICATION_ERROR
           
static int SECURITY_ALERT
           
static int SERVER_CANNOT_PROCESS_SESSION
           
static int SERVER_ERROR
           
static int SERVICE_NOT_FOUND
           
static int SERVICE_REFERRAL_ERROR
           
static int SESSION_TIMEOUT
           
static int STORAGE_RDONLY
           
static int UNABLE_TO_AUTHENTICATE
           
static int UNABLE_TO_SIGN_REQUEST
           
static int UNKNOWN_ALGORITHM_ID
           
static int UNKNOWN_PROTOCOL
           
 
Constructor Summary
HandleException(int code)
           
HandleException(int code, java.lang.String message)
           
HandleException(int code, java.lang.String message, java.lang.Throwable throwable)
           
HandleException(int code, java.lang.Throwable throwable)
           
 
Method Summary
 int getCode()
           
static java.lang.String getCodeStr(int c)
           
static HandleException ofResponse(AbstractResponse response)
           
 ErrorResponse toErrorResponse(AbstractRequest req)
           
static ErrorResponse toErrorResponse(AbstractRequest req, java.lang.Exception e)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INVALID_VALUE

public static final int INVALID_VALUE
See Also:
Constant Field Values

INTERNAL_ERROR

public static final int INTERNAL_ERROR
See Also:
Constant Field Values

SERVICE_NOT_FOUND

public static final int SERVICE_NOT_FOUND
See Also:
Constant Field Values

NO_ACCEPTABLE_INTERFACES

public static final int NO_ACCEPTABLE_INTERFACES
See Also:
Constant Field Values

UNKNOWN_PROTOCOL

public static final int UNKNOWN_PROTOCOL
See Also:
Constant Field Values

HANDLE_ALREADY_EXISTS

public static final int HANDLE_ALREADY_EXISTS
See Also:
Constant Field Values

MESSAGE_FORMAT_ERROR

public static final int MESSAGE_FORMAT_ERROR
See Also:
Constant Field Values

CANNOT_CONNECT_TO_SERVER

public static final int CANNOT_CONNECT_TO_SERVER
See Also:
Constant Field Values

UNABLE_TO_AUTHENTICATE

public static final int UNABLE_TO_AUTHENTICATE
See Also:
Constant Field Values

HANDLE_DOES_NOT_EXIST

public static final int HANDLE_DOES_NOT_EXIST
See Also:
Constant Field Values

SECURITY_ALERT

public static final int SECURITY_ALERT
See Also:
Constant Field Values

CONFIGURATION_ERROR

public static final int CONFIGURATION_ERROR
See Also:
Constant Field Values

REPLICATION_ERROR

public static final int REPLICATION_ERROR
See Also:
Constant Field Values

MISSING_OR_INVALID_SIGNATURE

public static final int MISSING_OR_INVALID_SIGNATURE
See Also:
Constant Field Values

MISSING_CRYPTO_PROVIDER

public static final int MISSING_CRYPTO_PROVIDER
See Also:
Constant Field Values

SERVER_ERROR

public static final int SERVER_ERROR
See Also:
Constant Field Values

UNKNOWN_ALGORITHM_ID

public static final int UNKNOWN_ALGORITHM_ID
See Also:
Constant Field Values

GOT_EXPIRED_MESSAGE

public static final int GOT_EXPIRED_MESSAGE
See Also:
Constant Field Values

STORAGE_RDONLY

public static final int STORAGE_RDONLY
See Also:
Constant Field Values

UNABLE_TO_SIGN_REQUEST

public static final int UNABLE_TO_SIGN_REQUEST
See Also:
Constant Field Values

INVALID_SESSION_EXCHANGE_PRIVKEY

public static final int INVALID_SESSION_EXCHANGE_PRIVKEY
See Also:
Constant Field Values

NEED_RSAKEY_FOR_SESSIONEXCHANGE

public static final int NEED_RSAKEY_FOR_SESSIONEXCHANGE
See Also:
Constant Field Values

NEED_PUBLICKEY_FOR_SESSIONIDENTITY

public static final int NEED_PUBLICKEY_FOR_SESSIONIDENTITY
See Also:
Constant Field Values

SESSION_TIMEOUT

public static final int SESSION_TIMEOUT
See Also:
Constant Field Values

INCOMPLETE_SESSIONSETUP

public static final int INCOMPLETE_SESSIONSETUP
See Also:
Constant Field Values

SERVER_CANNOT_PROCESS_SESSION

public static final int SERVER_CANNOT_PROCESS_SESSION
See Also:
Constant Field Values

ENCRYPTION_ERROR

public static final int ENCRYPTION_ERROR
See Also:
Constant Field Values

OTHER_CONNECTION_ESTABLISHED

public static final int OTHER_CONNECTION_ESTABLISHED
See Also:
Constant Field Values

DUPLICATE_SESSION_COUNTER

public static final int DUPLICATE_SESSION_COUNTER
See Also:
Constant Field Values

SERVICE_REFERRAL_ERROR

public static final int SERVICE_REFERRAL_ERROR
See Also:
Constant Field Values

OTHER_CONNECTION_ESTABLISHED_STRING

public static final java.lang.String OTHER_CONNECTION_ESTABLISHED_STRING
See Also:
Constant Field Values
Constructor Detail

HandleException

public HandleException(int code)

HandleException

public HandleException(int code,
                       java.lang.String message)

HandleException

public HandleException(int code,
                       java.lang.Throwable throwable)

HandleException

public HandleException(int code,
                       java.lang.String message,
                       java.lang.Throwable throwable)
Method Detail

getCodeStr

public static final java.lang.String getCodeStr(int c)

getCode

public int getCode()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Throwable

toErrorResponse

public ErrorResponse toErrorResponse(AbstractRequest req)

toErrorResponse

public static ErrorResponse toErrorResponse(AbstractRequest req,
                                            java.lang.Exception e)

ofResponse

public static HandleException ofResponse(AbstractResponse response)