📄 errorcode.java
字号:
/*------------------------------------------------------------------------------Name: ErrorCode.javaProject: xmlBlaster.orgCopyright: xmlBlaster.org, see xmlBlaster-LICENSE file------------------------------------------------------------------------------*/package org.xmlBlaster.util.def;import java.util.TreeMap;import java.util.Iterator;import org.xmlBlaster.util.FileLocator;import org.xmlBlaster.util.ReplaceVariable;/** * This class holds an enumeration error codes. * <p> * If you need new error code add it here following the same schema. * </p> * <p> * The documentation is created by examining this class with it links. * </p> * @author xmlBlaster@marcelruff.info * @see <a href="http://www.xmlBlaster.org/xmlBlaster/doc/requirements/admin.errorcodes.html">The admin.errorcodes requirement</a> */public final class ErrorCode implements java.io.Serializable{ private static final long serialVersionUID = 6926365721931493917L; private final static TreeMap errorCodeMap = new TreeMap(); // The key is the 'errorCode' String and the value is an 'ErrorCode' instance private final String errorCode; private final String description; private final ResourceInfo[] resourceInfos; ////////// BEGIN /////////// Add the error code instances here //////////////////// public static final ErrorCode LEGACY = new ErrorCode("legacy", "This error code marks all old style XmlBlasterExceptions until they are ported to the new behaviour.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "admin.errorcodes", "admin.errorcodes") } ); public static final ErrorCode INTERNAL = new ErrorCode("internal", "These category is an internal exception, usually a Java runtime exception, please post it to the mailing list.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "admin.errorcodes", "admin.errorcodes") } ); public static final ErrorCode INTERNAL_UNKNOWN = new ErrorCode("internal.unknown", "This is an unknown and unexpected error, usually a Java runtime exception, please post it to the mailing list.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "admin.errorcodes", "admin.errorcodes") } ); public static final ErrorCode INTERNAL_NULLPOINTER = new ErrorCode("internal.nullpointer", "A null pointer is an xmlBlaster internal programming error, please post it to the mailing list.", new ResourceInfo[] { } ); public static final ErrorCode INTERNAL_ILLEGALARGUMENT = new ErrorCode("internal.illegalArgument", "An illegal argument is an xmlBlaster internal programming error, please post it to the mailing list.", new ResourceInfo[] { } ); public static final ErrorCode INTERNAL_INTERRUPTED = new ErrorCode("internal.interrupted", "An unexpected InterruptedException for a thread occurred, please post it to the mailing list.", new ResourceInfo[] { } ); public static final ErrorCode INTERNAL_NOTIMPLEMENTED = new ErrorCode("internal.notImplemented", "The feature is not implemented yet.", new ResourceInfo[] { } ); public static final ErrorCode INTERNAL_CONNECTIONFAILURE = new ErrorCode("internal.connectionFailure", "An internal error occurred, we were not able to access the server handle.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "interface.connect", "interface.connect"), } ); public static final ErrorCode INTERNAL_ILLEGALSTATE = new ErrorCode("internal.illegalState", "The state of an object is not allowed.", new ResourceInfo[] { } ); public static final ErrorCode INTERNAL_DISCONNECT = new ErrorCode("internal.disconnect", "An internal error occurred when processing a disconnect() request.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "interface.disconnect", "interface.disconnect") } ); public static final ErrorCode INTERNAL_SUBSCRIBE = new ErrorCode("internal.subscribe", "An internal error occurred when processing a subscribe() request.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "interface.subscribe", "interface.subscribe") } ); public static final ErrorCode INTERNAL_UNSUBSCRIBE = new ErrorCode("internal.unSubscribe", "An internal error occurred when processing an unSubscribe() request.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "interface.unSubscribe", "interface.unSubscribe") } ); public static final ErrorCode INTERNAL_PUBLISH = new ErrorCode("internal.publish", "An internal error occurred when processing a publish() request.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "interface.publish", "interface.publish"), } ); public static final ErrorCode INTERNAL_PUBLISH_ARR = new ErrorCode("internal.publishArr", "An internal error occurred when processing a publishArr() request.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "interface.publish", "interface.publish"), } ); public static final ErrorCode INTERNAL_ERASE = new ErrorCode("internal.erase", "An internal error occurred when processing a erase() request.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "interface.erase", "interface.erase"), } ); public static final ErrorCode INTERNAL_GET = new ErrorCode("internal.get", "An internal error occurred when processing a get() request.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "interface.get", "interface.get"), } ); public static final ErrorCode INTERNAL_STOP = new ErrorCode("internal.stop", "An internal control exception, for example to stop parsing of XML.", new ResourceInfo[] { } ); public static final ErrorCode RESOURCE = new ErrorCode("resource", "This category is for resource problems like too low memory. It can usually be fixed by the administrator", new ResourceInfo[] { } ); public static final ErrorCode RESOURCE_OUTOFMEMORY = new ErrorCode("resource.outOfMemory", "The JVM has no more RAM memory, try increasing it like 'java -Xms18M -Xmx256M org.xmlBlaster.Main'", new ResourceInfo[] { new ResourceInfo(ResourceInfo.URL, "Increasing JVM heap", "http://java.sun.com/docs/hotspot/ism.html") } ); public static final ErrorCode RESOURCE_TOO_MANY_THREADS = new ErrorCode("resource.tooManyThreads", "The number of threads used is exceeded, try increasing the number of threads in the properties", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "Increasing the number of threads", "queue.jdbc.commontable") } ); public static final ErrorCode RESOURCE_EXHAUST = new ErrorCode("resource.exhaust", "A resource of your system exhausted", new ResourceInfo[] { } ); /* public static final ErrorCode RESOURCE_NOMORESPACE = new ErrorCode("resource.noMoreSpace", "The harddisk is full", new ResourceInfo[] { } ); */ public static final ErrorCode RESOURCE_CALLBACKSERVER_CREATION = new ErrorCode("resource.callbackServer.creation", "The callback server can't be created", new ResourceInfo[] { } ); public static final ErrorCode RESOURCE_OVERFLOW_QUEUE_BYTES = new ErrorCode("resource.overflow.queue.bytes", "The maximum size in bytes of a queue is exhausted", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "queue", "queue"), new ResourceInfo(ResourceInfo.REQ, "engine.queue", "engine.queue"), new ResourceInfo(ResourceInfo.API, "queue configuration", "org.xmlBlaster.util.qos.storage.QueuePropertyBase"), new ResourceInfo(ResourceInfo.API, "client queue configuration", "org.xmlBlaster.util.qos.storage.ClientQueueProperty"), new ResourceInfo(ResourceInfo.API, "callback queue configuration", "org.xmlBlaster.util.qos.storage.CbQueueProperty") } ); public static final ErrorCode RESOURCE_OVERFLOW_QUEUE_ENTRIES = new ErrorCode("resource.overflow.queue.entries", "The maximum number of entries of a queue is exhausted", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "queue", "queue"), new ResourceInfo(ResourceInfo.REQ, "engine.queue", "engine.queue"), new ResourceInfo(ResourceInfo.API, "queue configuration", "org.xmlBlaster.util.qos.storage.QueuePropertyBase"), new ResourceInfo(ResourceInfo.API, "client queue configuration", "org.xmlBlaster.util.qos.storage.ClientQueueProperty"), new ResourceInfo(ResourceInfo.API, "callback queue configuration", "org.xmlBlaster.util.qos.storage.CbQueueProperty") } ); public static final ErrorCode RESOURCE_UNAVAILABLE = new ErrorCode("resource.unavailable", "The resource is not available (e.g. it is shutdown)", new ResourceInfo[] { } ); public static final ErrorCode RESOURCE_DB_UNAVAILABLE = new ErrorCode("resource.db.unavailable", "There is no connection to a backend database using JDBC", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "queue.jdbc.hsqldb", "queue.jdbc.hsqldb"), new ResourceInfo(ResourceInfo.API, "JDBC connection management", "org.xmlBlaster.util.queue.jdbc.JdbcConnectionPool") } ); public static final ErrorCode RESOURCE_DB_BLOCK = new ErrorCode("resource.db.block", "A timeout occurred while accessing the database, typically caused by concurrent multithreaded access", // Used in C queue (SQLite) new ResourceInfo[] { } ); public static final ErrorCode RESOURCE_DB_UNKNOWN = new ErrorCode("resource.db.unknown", "An unknown error with the backend database using JDBC occurred", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "queue.jdbc.hsqldb", "queue.jdbc.hsqldb"), new ResourceInfo(ResourceInfo.API, "JDBC connection management", "org.xmlBlaster.util.queue.jdbc.JdbcConnectionPool") } ); public static final ErrorCode RESOURCE_ADMIN_UNAVAILABLE = new ErrorCode("resource.admin.unavailable", "The administrative support is switched off for this xmlBlaster instance", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "admin.messages", "admin.messages") } ); public static final ErrorCode RESOURCE_CONFIGURATION = new ErrorCode("resource.configuration", "Please check your configuration.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "client.configuration", "client.configuration"), new ResourceInfo(ResourceInfo.REQ, "The CORBA protocol plugin", "protocol.corba.JacORB") } ); public static final ErrorCode RESOURCE_CONFIGURATION_CONNECT = new ErrorCode("resource.configuration.connect", "Please check your connection configuration settings or the availability of a remote server.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "client.configuration", "client.configuration"), new ResourceInfo(ResourceInfo.REQ, "The EMAIL protocol plugin", "protocol.email") } ); public static final ErrorCode RESOURCE_CONFIGURATION_PLUGINFAILED = new ErrorCode("resource.configuration.pluginFailed", "A plugin required couldn't be loaded, please check your configuration.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "The runlevel manager howto", "engine.runlevel.howto"), new ResourceInfo(ResourceInfo.REQ, "The runlevel manager", "engine.runlevel") } ); public static final ErrorCode RESOURCE_CONFIGURATION_XML = new ErrorCode("resource.configuration.xml", "Your XML / XSL configuration needs to be adjusted, please check your configuration.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.URL, "Changing XML/XSL implementation", "http://www.xmlblaster.org/FAQ.html#xml-parser") } ); public static final ErrorCode RESOURCE_CONFIGURATION_SSLSOCKET = new ErrorCode("resource.configuration.sslSocket", "A SOCKET plugin required couldn't be loaded, please check your (ssl) configuration.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "The runlevel manager howto", "engine.runlevel.howto"), new ResourceInfo(ResourceInfo.REQ, "The SOCKET protocol specification", "protocol.socket") } ); public static final ErrorCode RESOURCE_CONFIGURATION_ADDRESS = new ErrorCode("resource.configuration.address", "A remote address you passed is invalid, please check your configuration.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.API, "client queue configuration", "org.xmlBlaster.util.qos.address.AddressBase") } ); public static final ErrorCode RESOURCE_FILEIO = new ErrorCode("resource.fileIO", "A file access failed.", new ResourceInfo[] { } ); public static final ErrorCode RESOURCE_FILEIO_FILELOST = new ErrorCode("resource.fileIO.fileLost", "A file disappeared, access failed.", new ResourceInfo[] { } ); public static final ErrorCode RESOURCE_CLUSTER_NOTAVAILABLE = new ErrorCode("resource.cluster.notAvailable", "A remote cluster node is not reachable.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "cluster requirement", "cluster") } ); public static final ErrorCode RESOURCE_CLUSTER_CIRCULARLOOP = new ErrorCode("resource.cluster.circularLoop", "A message loops between cluster nodes and can't reach its destination, please check the destination cluster node name.", new ResourceInfo[] { new ResourceInfo(ResourceInfo.REQ, "cluster PtP requirement", "cluster.PtP"), new ResourceInfo(ResourceInfo.REQ, "cluster requirement", "cluster") } ); public static final ErrorCode COMMUNICATION = new ErrorCode("communication", "This category is related to communication problems between client and server.", new ResourceInfo[] { } ); public static final ErrorCode COMMUNICATION_NOCONNECTION = new ErrorCode("communication.noConnection", "A specific remote connection throws an exception on invocation.", new ResourceInfo[] { } ); public static final ErrorCode COMMUNICATION_TIMEOUT = new ErrorCode("communication.timeout", "The socket call blocked until a timeout occurred.", new ResourceInfo[] { } ); public static final ErrorCode COMMUNICATION_RESPONSETIMEOUT = new ErrorCode("communication.responseTimeout", "A method call blocked when waiting on the ACK/NAK return message.", new ResourceInfo[] { } ); public static final ErrorCode COMMUNICATION_FORCEASYNC = new ErrorCode("communication.forceAsync", "Thrown if a ping is called but we can't afford to block until it succeeds.", new ResourceInfo[] { }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -