Class TcapError
-
- All Implemented Interfaces:
DataObject
,Immutable
,Serializable
public final class TcapError extends ImmutableDataObject
Describes a single TCAP error. This corresponds to the ERROR information object class defined in the ITU X.880 ASN.1 module Remote-Operations-Information-Objects {joint-iso-itu-t remote-operations(4) informationObjects(5) version1(0)}- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TcapError(TcapError parent, String fieldName, String protocolName, String moduleName, String valuerefName, String apiName, Code code, String paramTypeName, boolean paramOptional, EventTypeID errorEventTypeID, String errorEventClassName)
Creates a new TcapError.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getAPIName()
Get the name used in this API for this error.String
getASN1Module()
Get the name of the ASN.1 module containing the definition of this errorString
getASN1Name()
Get the ASN.1 value reference name defining this errorTcapError
getBaseError()
Get the base error of this error.Code
getErrorCode()
Get the error code of this error.Class<?>
getErrorEventClass(ClassLoader loader)
Get the event class used to fire this error.String
getErrorEventClassName()
Get the name of the event class used to fire this error.EventTypeID
getErrorEventTypeID()
Get the event type used to fire this error.String
getFieldName()
Get the field name of this error.Class<?>
getParameterType(ClassLoader loader)
Get the Java Class used to carry the parameter of this errorString
getParameterTypeName()
Get the name of the Java Class used to carry the parameter of this errorTcapError
getParentError()
Get the parent error of this error.String
getProtocolName()
Get the name of the error's protocol.int
hashCode()
boolean
isA(TcapError other)
Test if this is a suberror of another errorboolean
isParameterOptional()
Check if the parameter of this error is optional.String
toString()
-
Methods inherited from class com.opencloud.util.ImmutableDataObject
clone, isReadOnly, setReadOnly
-
-
-
-
Constructor Detail
-
TcapError
public TcapError(TcapError parent, String fieldName, String protocolName, String moduleName, String valuerefName, String apiName, Code code, String paramTypeName, boolean paramOptional, EventTypeID errorEventTypeID, String errorEventClassName)
Creates a new TcapError.- Parameters:
parent
- the parent error of this error, ornull
if this error has no parentfieldName
- the full field name defining this errorprotocolName
- the name of this error's protocolmoduleName
- the name of the ASN.1 module defining this errorvaluerefName
- the valueref name within the ASN.1 module for this error definitionapiName
- the short name of this operation used within the APIcode
- the error code of the errorparamTypeName
- the name of the Java class used to carry the parameter data of this error, ornull
if the operation has no parameterparamOptional
- true iff the error parameter is optionalerrorEventTypeID
- the event type that this error is fired aserrorEventClassName
- the name of the event class that this error is fired as
-
-
Method Detail
-
getFieldName
public String getFieldName()
Get the field name of this error.- Returns:
- the field name
-
getProtocolName
public String getProtocolName()
Get the name of the error's protocol.- Returns:
- the protocol name
-
getASN1Name
public String getASN1Name()
Get the ASN.1 value reference name defining this error- Returns:
- the unqualified value reference name
-
getASN1Module
public String getASN1Module()
Get the name of the ASN.1 module containing the definition of this error- Returns:
- the ASN.1 module name
-
getAPIName
public String getAPIName()
Get the name used in this API for this error. This is used to construct names of event classes, helper methods, etc. and usually (but not always) it is the same as the ASN.1 value reference name.- Returns:
- the API name
-
getErrorCode
public Code getErrorCode()
Get the error code of this error.- Returns:
- the error code
-
getParameterType
public Class<?> getParameterType(ClassLoader loader)
Get the Java Class used to carry the parameter of this error- Parameters:
loader
- the classloader to use to load the class- Returns:
- the parameter type class, or
null
if the error has no parameter type defined - Throws:
TypeNotPresentException
- if the class cannot be loaded
-
getParameterTypeName
public String getParameterTypeName()
Get the name of the Java Class used to carry the parameter of this error- Returns:
- the parameter type class, or
null
if the error has no parameter type defined
-
isParameterOptional
public boolean isParameterOptional()
Check if the parameter of this error is optional.- Returns:
- true iff the error parameter is optional
-
getParentError
public TcapError getParentError()
Get the parent error of this error.- Returns:
- the parent error of this error, or
null
if this error has no parent
-
getBaseError
public TcapError getBaseError()
Get the base error of this error. This is the "topmost" parent error in the error hierarchy, which has no declared parent itself.- Returns:
- the base error of this error, or
this
if this error has no parent.
-
getErrorEventTypeID
public EventTypeID getErrorEventTypeID()
Get the event type used to fire this error.- Returns:
- the event type
-
getErrorEventClass
public Class<?> getErrorEventClass(ClassLoader loader)
Get the event class used to fire this error.- Parameters:
loader
- the classloader to use to load the class- Returns:
- the event class
- Throws:
TypeNotPresentException
- if the class cannot be loaded
-
getErrorEventClassName
public String getErrorEventClassName()
Get the name of the event class used to fire this error.- Returns:
- the event class name
-
isA
public boolean isA(TcapError other)
Test if this is a suberror of another error- Parameters:
other
- the other error to test against- Returns:
- true if other is a transitive parent of this error
-
-