|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jmonks.batch.framework.ErrorCode
The ErrorCode represents the error condition that can generate in the system. It consists of the code which uniquely identifies the ErrorCode and message which explains the error in the system. This is also used to represent the status code for any processor/controller/job. This provides the flexibility to create new custom ErrorCodes and append the message to the existing ErrorCode. Codes ranging from 0 to 100 are reserved for framework purposes. Use the codes above 100 to create the custom error codes.
Field Summary | |
static ErrorCode |
BASIC_JOB_PROCESSOR_EXCEPTION
Represents error because of the exception in basic job processor. |
static ErrorCode |
FRAMEWORK_CONFIGURATION_ERROR
Represents the framework configuration error. |
static ErrorCode |
JOB_COMPLETED_SUCCESSFULLY
Represents job got completed successfully. |
static ErrorCode |
JOB_COMPLETED_WITH_ERRORS
Represents job got completed with errors. |
static ErrorCode |
JOB_CONFIG_FACTORY_CONFIGURATION_ERROR
Represents the job config factory configuration error. |
static ErrorCode |
JOB_CONFIGURATION_ERROR
Represents the job configuration error. |
static ErrorCode |
JOB_CONNECTOR_CONFIGURATION_ERROR
Represents the connector configuration error. |
static ErrorCode |
JOB_CONTROLLER_CONFIGURATION_ERROR
Represents the job controller configuration error. |
static ErrorCode |
JOB_INVOKATION_CONFIGURAION_ERROR
Represents the configuration error used to invoke the job. |
static ErrorCode |
JOB_IS_NOT_CONFIGURED
Represents the job is not configured error. |
static ErrorCode |
JOB_LOGGING_CONFIGURATION_ERROR
Represents the logging configuration error. |
static ErrorCode |
JOB_REPOSITORY_CONFIGURATION_ERROR
Represents the repository configuration error. |
static ErrorCode |
POOL_JOB_LOADER_EXCEPTION
Represents error because of the exception in pool job loader. |
static ErrorCode |
POOL_JOB_PROCESSOR_EXCEPTION
Represents error because of the exception in pool job processor. |
static ErrorCode |
UNKNOWN_CONFIGURATION_ERROR
Represents the unknown configuration error. |
Method Summary | |
ErrorCode |
appendMessage(java.lang.String messageToBeAppended)
Creates a new ErrorCode object with the same error code and appends the given message to the existing message and returns new ErrorCode. |
static ErrorCode |
createErrorCode(int newCode,
java.lang.String newMessage)
Creates a new error code instance by accepting the code and message. |
boolean |
equals(java.lang.Object errorCode)
Equality will be based on the code the two ErrorCodes contains. |
int |
getCode()
Returns the error code represents the error. |
java.lang.String |
getMessage()
Returns the error message illustrates the exit code. |
int |
hashCode()
Code represented by ErrorCode will be returned as a hash code. |
java.lang.String |
toString()
Returns the string representation of ErrorCode class in the format {ErrorCode [code = value] [message = value]} |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final ErrorCode JOB_COMPLETED_SUCCESSFULLY
public static final ErrorCode JOB_COMPLETED_WITH_ERRORS
public static final ErrorCode JOB_INVOKATION_CONFIGURAION_ERROR
public static final ErrorCode FRAMEWORK_CONFIGURATION_ERROR
public static final ErrorCode JOB_CONFIG_FACTORY_CONFIGURATION_ERROR
public static final ErrorCode JOB_CONFIGURATION_ERROR
public static final ErrorCode JOB_IS_NOT_CONFIGURED
public static final ErrorCode JOB_CONTROLLER_CONFIGURATION_ERROR
public static final ErrorCode JOB_LOGGING_CONFIGURATION_ERROR
public static final ErrorCode JOB_REPOSITORY_CONFIGURATION_ERROR
public static final ErrorCode JOB_CONNECTOR_CONFIGURATION_ERROR
public static final ErrorCode UNKNOWN_CONFIGURATION_ERROR
public static final ErrorCode BASIC_JOB_PROCESSOR_EXCEPTION
public static final ErrorCode POOL_JOB_LOADER_EXCEPTION
public static final ErrorCode POOL_JOB_PROCESSOR_EXCEPTION
Method Detail |
public int getCode()
public java.lang.String getMessage()
public ErrorCode appendMessage(java.lang.String messageToBeAppended)
messageToBeAppended
- Message that needs to be appended to the existing message.
public static ErrorCode createErrorCode(int newCode, java.lang.String newMessage)
newCode
- Code to be used to construct the ErrorCode.newMessage
- Mesage to be used to construct the ErrorCode.
java.lang.IllegalArgumentException
- If given message is null or empty.public boolean equals(java.lang.Object errorCode)
Object.equals(java.lang.Object)
public int hashCode()
Object.hashCode()
public java.lang.String toString()
Returns the string representation of ErrorCode class in the format
{ErrorCode [code = value] [message = value]}
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |