public class ITKMessagingException extends Exception
<itk:ToolkitErrorInfo/>
information elementsITKTransportTimeoutException
,
ITKCommsException
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
ACCESS_DENIED_CODE
Access Denied
|
static String |
ACCESS_DENIED_TEXT
Standard text associated with the
ACCESS_DENIED_CODE |
static String |
DEFAULT_ERROR_CODESYSTEM_OID
This is the OID to represent the default code system when raising SOAP faults etc.
|
static int |
INVALID_MESSAGE_CODE
Invalid Message - the message structure or content is unrecognised or incorrect
|
static String |
INVALID_MESSAGE_TEXT
Standard text associated with the
INVALID_MESSAGE_CODE |
static int |
NO_ERROR_CODE
Default error "code" that indicates that no
error code is associated with this ITKMessagingException
|
static int |
PROCESSING_ERROR_NOT_RETRYABLE_CODE
Processing Error (not retryable) - a non-recoverable processing error has been encountered
|
static String |
PROCESSING_ERROR_NOT_RETRYABLE_TEXT
Standard text associated with the
PROCESSING_ERROR_NOT_RETRYABLE_CODE |
static int |
PROCESSING_ERROR_RETRYABLE_CODE
Processing Error (retryable) - a recoverable processing error has been encountered
|
static String |
PROCESSING_ERROR_RETRYABLE_TEXT
Standard text associated with the
PROCESSING_ERROR_RETRYABLE_CODE |
Constructor and Description |
---|
ITKMessagingException(int errorCode,
String message)
Creates an ITKMessagingException with any relevant diagnostic
information about the error - such as the likely cause.
|
ITKMessagingException(int errorCode,
String message,
Throwable cause)
Creates an ITKMessagingException that wraps an underlying
Throwable which has been encountered
when sending/receiving a messageNote: by default the errorCode is assumed to be
a code associated with the
DEFAULT_ERROR_CODESYSTEM_OID codeSystem |
ITKMessagingException(ITKMessageProperties itkMessageProperties,
int errorCode,
String arg0) |
ITKMessagingException(ITKMessageProperties itkMessageProperties,
int errorCode,
String message,
Throwable cause) |
ITKMessagingException(ITKTransportProperties itkTransportProperties,
ITKMessageProperties itkMessageProperties,
int errorCode,
String message) |
ITKMessagingException(ITKTransportProperties itkTransportProperties,
ITKMessageProperties itkMessageProperties,
int errorCode,
String message,
Throwable cause) |
ITKMessagingException(String message)
Creates an ITKMessagingException with any relevant diagnostic
information about the error - such as the likely cause
|
ITKMessagingException(String message,
Throwable cause)
Creates an ITKMessagingException that wraps an underlying
Throwable which has been encountered
when sending/receiving a message |
ITKMessagingException(Throwable cause)
Creates an ITKMessagingException that wraps an underlying
Throwable which has been encountered
when sending/receiving a message |
Modifier and Type | Method and Description |
---|---|
String |
decodeErrorCode()
Convenience method to decode any
errorCode
from the DEFAULT_ERROR_CODESYSTEM_OID . |
int |
getErrorCode()
Obtains the
errorCode associated with
the ITKMessagingException. |
String |
getErrorCodeSystem()
Obtains the
errorCodeSystem for any
errorCode associated with the
ITKMessagingException. |
String |
getErrorId()
Obtains the unique errorId for the ITKMessagingException
The
errorId is typically expected to be
used in applications logs to uniquely tie
log messages / exception traces together to aid in diagnostics |
String |
getLocalizedMessage()
Obtains the standard (human readable message) associated with the
ITKMessagingException in the language for the
Locale where it
localised messages are available. |
String |
getMessage()
Obtains the standard (human readable message) associated with the
ITKMessagingException.
|
ITKTransportProperties |
getRelatedItkTransportProperties() |
ITKMessageProperties |
getRelatedMessageProperties() |
void |
setErrorCode(int errorCode)
Sets the
errorCode associated with
the ITKMessagingException. |
void |
setErrorCodeSystem(String errorCodeSystem)
Sets the
errorCodeSystem for any
errorCode associated with the
ITKMessagingException. |
void |
setErrorId(String errorId)
Obtains the unique errorId for the ITKMessagingException
The
errorId is typically expected to be
used in applications logs to uniquely tie
log messages / exception traces together to aid in diagnostics |
void |
setRelatedItkTransportProperties(ITKTransportProperties relatedItkTransportProperties) |
void |
setRelatedMessageProperties(ITKMessageProperties relatedMessageProperties) |
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final String DEFAULT_ERROR_CODESYSTEM_OID
2.16.840.1.1138883.2.1.3.2.4.17.268
public static final int NO_ERROR_CODE
public static final int INVALID_MESSAGE_CODE
public static final int PROCESSING_ERROR_RETRYABLE_CODE
public static final int PROCESSING_ERROR_NOT_RETRYABLE_CODE
public static final int ACCESS_DENIED_CODE
public static final String INVALID_MESSAGE_TEXT
INVALID_MESSAGE_CODE
public static final String PROCESSING_ERROR_RETRYABLE_TEXT
PROCESSING_ERROR_RETRYABLE_CODE
public static final String PROCESSING_ERROR_NOT_RETRYABLE_TEXT
PROCESSING_ERROR_NOT_RETRYABLE_CODE
public static final String ACCESS_DENIED_TEXT
ACCESS_DENIED_CODE
public ITKMessagingException(String message)
message
- The diagnostic message about the
the error conditionpublic ITKMessagingException(Throwable cause)
Throwable
which has been encountered
when sending/receiving a messagecause
- The Throwable
containing
the root causepublic ITKMessagingException(int errorCode, String message)
getErrorCode()
.errorCode
is assumed to be
a code associated with the
DEFAULT_ERROR_CODESYSTEM_OID
codeSystemerrorCode
- The appropriate errorCode associated
with the exception - INVALID_MESSAGE_CODE
;
PROCESSING_ERROR_RETRYABLE_CODE
;
PROCESSING_ERROR_NOT_RETRYABLE_CODE
and
ACCESS_DENIED_CODE
message
- The diagnostic message about the
the error conditionpublic ITKMessagingException(String message, Throwable cause)
Throwable
which has been encountered
when sending/receiving a messagemessage
- The diagnostic message about the
the error conditioncause
- The Throwable
containing
the root causepublic ITKMessagingException(int errorCode, String message, Throwable cause)
Throwable
which has been encountered
when sending/receiving a messageerrorCode
is assumed to be
a code associated with the
DEFAULT_ERROR_CODESYSTEM_OID
codeSystemerrorCode
- The appropriate errorCode associated
with the exception - INVALID_MESSAGE_CODE
;
PROCESSING_ERROR_RETRYABLE_CODE
;
PROCESSING_ERROR_NOT_RETRYABLE_CODE
and
ACCESS_DENIED_CODE
message
- The diagnostic message about the
the error conditioncause
- The Throwable
containing
the root causepublic ITKMessagingException(ITKTransportProperties itkTransportProperties, ITKMessageProperties itkMessageProperties, int errorCode, String message)
public ITKMessagingException(ITKTransportProperties itkTransportProperties, ITKMessageProperties itkMessageProperties, int errorCode, String message, Throwable cause)
public ITKMessagingException(ITKMessageProperties itkMessageProperties, int errorCode, String arg0)
public ITKMessagingException(ITKMessageProperties itkMessageProperties, int errorCode, String message, Throwable cause)
public int getErrorCode()
errorCode
associated with
the ITKMessagingException.
Note: by default the errorCode
is assumed to be
a code associated with the
DEFAULT_ERROR_CODESYSTEM_OID
codeSystemerrorCode
associated
with the exception and appropriate to the
getErrorCodeSystem()
}. If no error code
has been defined NO_ERROR_CODE
(the int -1)
is returnedpublic void setErrorCode(int errorCode)
errorCode
associated with
the ITKMessagingException.
Note: by default the errorCode
is assumed to be
a code associated with the
DEFAULT_ERROR_CODESYSTEM_OID
codeSystem. To use
and alternative system set the errorCodeSystem
via the setErrorCodeSystem(String)
methoderrorCode
- The appropriate errorCode associated
with the exception - INVALID_MESSAGE_CODE
;
PROCESSING_ERROR_RETRYABLE_CODE
;
PROCESSING_ERROR_NOT_RETRYABLE_CODE
and
ACCESS_DENIED_CODE
public String getErrorCodeSystem()
errorCodeSystem
for any
errorCode
associated with the
ITKMessagingException. This is only relevant if the
getErrorCode()
returns anything other than
NO_ERROR_CODE
errorCodeSystem
associated
with the errorCode
for with the
ITKMessagingException. The default error code system
is indicated by the
DEFAULT_ERROR_CODESYSTEM_OID
public void setErrorCodeSystem(String errorCodeSystem)
errorCodeSystem
for any
errorCode
associated with the
ITKMessagingException. This is only relevant if the
setErrorCode(int)
(or an appropriate constructor)
is used to set the errorCode
to something
other than NO_ERROR_CODE
errorCodeSystem
- The errorCodeSystem
associated
with the errorCode
for with the
ITKMessagingException. The default error code system
is indicated by the
DEFAULT_ERROR_CODESYSTEM_OID
public ITKMessageProperties getRelatedMessageProperties()
public void setRelatedMessageProperties(ITKMessageProperties relatedMessageProperties)
public String getErrorId()
errorId
is typically expected to be
used in applications logs to uniquely tie
log messages / exception traces together to aid in diagnosticserrorId
associated with this
ITKMessagingException.public void setErrorId(String errorId)
errorId
is typically expected to be
used in applications logs to uniquely tie
log messages / exception traces together to aid in diagnosticserrorId
- the errorId
associated with this
ITKMessagingException.public String getMessage()
errorId
to ensure it is represented in logs/stack tracesgetMessage
in class Throwable
public String getLocalizedMessage()
Locale
where it
localised messages are available.
The text also contains the errorId
to ensure it is represented in logs/stack tracesgetLocalizedMessage
in class Throwable
public String decodeErrorCode()
errorCode
from the DEFAULT_ERROR_CODESYSTEM_OID
.codeSystem
is not the DEFAULT_ERROR_CODESYSTEM_OID
returns the
getMessage()
text.public ITKTransportProperties getRelatedItkTransportProperties()
public void setRelatedItkTransportProperties(ITKTransportProperties relatedItkTransportProperties)
All content is available under the Open Government Licence, except where otherwise stated
All example source code is available under Apache 2.0, except where otherwise stated