Update of /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29723
Added Files:
ExitCode.java
Removed Files:
ErrorCode.java StatusCode.java
Log Message:
no message
--- ErrorCode.java DELETED ---
--- NEW FILE: ExitCode.java ---
package org.jmonks.batchserver.framework.common;
/**
* <p>
* The ExitCode represents the error condition can generate in the system
* that causes the job to exit. This holds exit code and message.
* This is like a enum class to make sure
* the exit codes being passed around the application are valid (defined).
* No instances of this class can be created from outside and cannot be instantiated.
* </p>
*
* @author Suresh Pragada
* @version 1.0
* @since 1.0
*/
public final class ExitCode
{
/**
* Code represents the error.
*/
private int code;
/**
* Message illustrates the code.
*/
private String message=null;
/**
* <p>
* Private constructor make sure no instances will be created of this class
* from outside of this class.
* </p>
*
* @param code Code represents the error.
* @param exitMsg Message illustrates the exit code.
*/
private ExitCode(int code, String exitMsg)
{
this.code=code;
this.message=exitMsg;
}
/**
* Returns the exit code represents the error.
*
* @return Returns the exit code represents the error.
*/
public int getCode()
{
return this.code;
}
/**
* Returns the exit message illustrates the exit code.
*
* @return Returns the error message.
*/
public String getMessage()
{
return this.message;
}
/**
* <p>
* Returns the string representation of ExitCode class in the format
* <br> {ExitCode [code = value] [message = value]}
* </p>
*
* @return Returns the string representation of ExitCode.
*/
public String toString()
{
StringBuffer stringValue=new StringBuffer("{ExitCode ");
stringValue.append("[code = " + this.code + "]");
stringValue.append("[message = " + this.message + "]");
stringValue.append("}");
return stringValue.toString();
}
/**
* Configuration Error Codes.
*/
public static final ExitCode JOB_SUCCESS = new ExitCode(0,"Job successfully completed.");
public static final ExitCode FRAMEWORK_CONFIGURATION_ERROR = new ExitCode(1001,"Error while accessing or parsing the framework configuration file.");
public static final ExitCode JOB_CONFIG_FACTORY_CONFIGURATION_ERROR = new ExitCode(1002,"Job configuration factory cannot be created by the given factory configuration.");
public static final ExitCode JOB_CONFIGURATION_ERROR = new ExitCode(1003,"Error while loading the job configuration from the defined factory.");
public static final ExitCode JOB_IS_NOT_CONFIGURED = new ExitCode(1004,"Job is not configured");
public static final ExitCode JOB_CONTROLLER_CONFIGURATION_ERROR = new ExitCode(1005,"Job controller configuration is not defined properly.");
}
--- StatusCode.java DELETED ---
|