|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.edustructures.sifworks.ADKException
com.edustructures.sifworks.ADKMessagingException
com.edustructures.sifworks.SIFException
public class SIFException
SIFException describes a SIF error condition. When handling inbound messages, the agent may throw a SIFException from a message handler to signal that an error has occurred and should be returned to the ZIS in the SIF_Ack message. The ADK will convert the SIFException to a SIF_Error element when sending the associated SIF_Ack. It is desirable to throw SIFException in your message handlers (versus generic exceptions) if you want control over setting the SIF_Error category, code, description, and extended description elements.
SIFException may also be thrown by ADK methods in response to a SIF_Ack
received from the server. The actual SIF_Ack object that generated the exception
can be retrieved by calling getAck. Any SIF_Error elements
included in the acknowledgement can be retrieved by calling getErrors
and associated methods such as hasError. Note SIF 1.0r1 allowed
for multiple SIF_Error elements per SIF_Ack, but later versions of SIF do
not. For backward compatibility, the ADK captures all SIF_Error elements
received in SIF_Ack messages and makes them available as an array. The array
can be obtained by calling the getErrors method.
| Field Summary | |
|---|---|
SIF_Ack |
fAck
The SIF_Ack that caused this exception (if the exception was raised in response to an incoming message) |
| Constructor Summary | |
|---|---|
SIFException(int category,
int code,
java.lang.String desc,
java.lang.String extDesc,
Zone zone)
Deprecated. Please use the overload that uses SIFErrorCategory as the first parameter |
|
SIFException(int category,
int code,
java.lang.String desc,
java.lang.String extDesc,
Zone zone,
java.lang.Exception innerException)
Deprecated. Please use the overload that uses SIFErrorCategory as the first parameter |
|
SIFException(int category,
int code,
java.lang.String desc,
Zone zone)
Deprecated. Please use the overload that uses SIFErrorCategory as the first parameter |
|
SIFException(int category,
int code,
java.lang.String desc,
Zone zone,
java.lang.Exception innerException)
Deprecated. Please use the overload that uses SIFErrorCategory as the first parameter |
|
SIFException(SIF_Ack ack,
Zone zone)
|
|
SIFException(SIFErrorCategory category,
int code,
java.lang.String desc,
java.lang.String extDesc,
Zone zone)
Constructs a SIFException for delivery to the ZIS. |
|
SIFException(SIFErrorCategory category,
int code,
java.lang.String desc,
java.lang.String extDesc,
Zone zone,
java.lang.Exception innerException)
Constructs a SifException for delivery to the ZIS |
|
SIFException(SIFErrorCategory category,
int code,
java.lang.String desc,
Zone zone)
Constructs a SIFException for delivery to the ZIS. |
|
SIFException(SIFErrorCategory category,
int code,
java.lang.String desc,
Zone zone,
java.lang.Exception innerException)
Constructs a SifException for delivery to the ZIS |
|
SIFException(java.lang.String msg,
SIF_Ack ack,
Zone zone)
|
|
| Method Summary | |
|---|---|
SIF_Ack |
getAck()
The SIF_Ack that is part of this exception |
SIF_Error |
getError()
Gets all SIF_Errors wrapped by this exception |
int |
getErrorCategory()
Deprecated. Please use getSIFErrorCategory |
int |
getErrorCode()
Gets the Error Code of the first SIF_Error element, or 0xFFFFFFFF if there are no errors. |
java.lang.String |
getErrorDesc()
Gets the Error Description of the first SIF_Error element, or null if there are no errors. |
java.lang.String |
getErrorExtDesc()
Gets the Extended Error Description of the first SIF_Error element, or null if there are no errors. |
java.lang.String |
getMessage()
|
SIFErrorCategory |
getSIFErrorCategory()
Gets the Error Category of the first SIF_Error element, or 0xFFFFFFFF if there are no errors. |
boolean |
hasError(int category,
int code)
Deprecated. Please use the overload of this method that takes a SIFErrorCategory as the first parameter |
boolean |
hasError(SIFErrorCategory category,
int code)
Determines if this SIFException has an error with the specified category and code. |
boolean |
hasErrorCategory(int category)
Deprecated. please use the overload that takes a SIFErrorCategory |
boolean |
hasErrorCategory(SIFErrorCategory category)
Determines if this SIFException has an error with the specified category. |
boolean |
hasErrors()
Determines if this SIFException describes any SIF_Errors |
void |
setErrorCategory(int category)
Sets the error category code of the first SIF_Error wrapped by this exception. |
void |
setErrorCategory(SIFErrorCategory category)
Sets the error category code of the first SIF_Error wrapped by this exception. |
void |
setErrorCode(int code)
Sets the error code of the first SIF_Error wrapped by this exception. |
void |
setErrorDesc(java.lang.String desc)
Sets the error description of the first SIF_Error wrapped by this exception. |
void |
setErrorExtDesc(java.lang.String extDesc)
Sets the optional extended error description of the first SIF_Error wrapped by this exception. |
void |
setSIF_Error(int category,
int code,
java.lang.String desc,
java.lang.String extDesc)
Sets the SIF_Error element associated with this exception. |
void |
setSIF_Error(SIFErrorCategory category,
int code,
java.lang.String desc,
java.lang.String extDesc)
Sets the SIF_Error element associated with this exception. |
| Methods inherited from class com.edustructures.sifworks.ADKException |
|---|
add, getChildren, getRetry, getSIFExceptions, getZone, getZoneId, hasChildren, hasSIFError, hasSIFError, hasSIFError, hasSIFError, hasSIFExceptions, log, log, setRetry, toString, toString |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public SIF_Ack fAck
| Constructor Detail |
|---|
public SIFException(SIF_Ack ack,
Zone zone)
ack - The SIF_Ack to usezone - The zone that this error applies to
public SIFException(java.lang.String msg,
SIF_Ack ack,
Zone zone)
msg - The error messageack - a SIF_Ack element to usezone - The zone that this error applies to
public SIFException(int category,
int code,
java.lang.String desc,
Zone zone)
category - A SIFErrorCodes.CAT_ error categorycode - A SIFErrorCodes error codedesc - The error descriptionzone - The zone on which the error occurred
public SIFException(int category,
int code,
java.lang.String desc,
java.lang.String extDesc,
Zone zone)
category - A SIFErrorCodes.CAT_ error categorycode - A SIFErrorCodes error codedesc - The error descriptionextDesc - An option extended error descriptionzone - The zone on which the error occurred
public SIFException(int category,
int code,
java.lang.String desc,
java.lang.String extDesc,
Zone zone,
java.lang.Exception innerException)
The Adk will include
the error information provided by the exception when it sends a SIF_Ack
in response to the message being processed. This form of constructor is
typically called by the Adk, but may also be called by agent code if an
exception occurs in a
category - A code - A desc - The error descriptionextDesc - An optional extended error descriptionzone - The zone on which the error occurredinnerException - The internal error that was thrown by the agent
public SIFException(int category,
int code,
java.lang.String desc,
Zone zone,
java.lang.Exception innerException)
The Adk will include
the error information provided by the exception when it sends a SIF_Ack
in response to the message being processed. This form of constructor is
typically called by the Adk, but may also be called by agent code if an
exception occurs in a
category - A code - A desc - The error descriptionzone - The zone on which the error occurredinnerException - The internal error that was thrown by the agent
public SIFException(SIFErrorCategory category,
int code,
java.lang.String desc,
Zone zone)
category - The category that applies to this type of errorcode - A SIFErrorCodes error codedesc - The error descriptionzone - The zone on which the error occurred
public SIFException(SIFErrorCategory category,
int code,
java.lang.String desc,
java.lang.String extDesc,
Zone zone)
category - The category that applies to this type of errorcode - A SIFErrorCodes error codedesc - The error descriptionextDesc - An option extended error descriptionzone - The zone on which the error occurred
public SIFException(SIFErrorCategory category,
int code,
java.lang.String desc,
Zone zone,
java.lang.Exception innerException)
The Adk will include
the error information provided by the exception when it sends a SIF_Ack
in response to the message being processed. This form of constructor is
typically called by the Adk, but may also be called by agent code if an
exception occurs in a
category - The category that applies to this type of errorcode - A desc - The error descriptionzone - The zone on which the error occurredinnerException - The internal error that was thrown by the agent
public SIFException(SIFErrorCategory category,
int code,
java.lang.String desc,
java.lang.String extDesc,
Zone zone,
java.lang.Exception innerException)
The Adk will include
the error information provided by the exception when it sends a SIF_Ack
in response to the message being processed. This form of constructor is
typically called by the Adk, but may also be called by agent code if an
exception occurs in a
category - The category that applies to this type of errorcode - A desc - The error descriptionextDesc - An optional extended error descriptionzone - The zone on which the error occurredinnerException - The internal error that was thrown by the agent| Method Detail |
|---|
public SIF_Error getError()
public boolean hasErrors()
public boolean hasError(int category,
int code)
true if any match the category and code.
category - The SIF error category to search forcode - The SIF error code to search for
true if any errors wrapped by this exception match
the category and code
public boolean hasError(SIFErrorCategory category,
int code)
true if any match the category and code.
category - The SIF error category to search forcode - The SIF error code to search for
true if any errors wrapped by this exception match
the category and codepublic boolean hasErrorCategory(int category)
true if any match the category.
category - The SIF error category to search for
true if any errors wrapped by this exception match
the categorypublic boolean hasErrorCategory(SIFErrorCategory category)
true if any match the category.
category - The SIF error category to search for
true if any errors wrapped by this exception match
the category
public void setSIF_Error(int category,
int code,
java.lang.String desc,
java.lang.String extDesc)
category - A SIFErrorCodes.CAT_ error categorycode - A SIFErrorCodes_ error codedesc - extDesc -
public void setSIF_Error(SIFErrorCategory category,
int code,
java.lang.String desc,
java.lang.String extDesc)
category - The category associated with this errorcode - A SIFErrorCodes_ error codedesc - extDesc - public void setErrorCategory(int category)
category - A SIFErrorCodes.CAT_ error categorypublic void setErrorCategory(SIFErrorCategory category)
category - The category to set to this exceptionpublic void setErrorCode(int code)
code - A SIFErrorCodes error codepublic void setErrorDesc(java.lang.String desc)
desc - The error descriptionpublic void setErrorExtDesc(java.lang.String extDesc)
extDesc - The extended error descriptionpublic int getErrorCategory()
public SIFErrorCategory getSIFErrorCategory()
public int getErrorCode()
public java.lang.String getErrorDesc()
public java.lang.String getErrorExtDesc()
public SIF_Ack getAck()
public java.lang.String getMessage()
getMessage in class java.lang.Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||