📄 constants.java
字号:
/*------------------------------------------------------------------------------Name: Constants.javaProject: xmlBlaster.orgCopyright: xmlBlaster.org, see xmlBlaster-LICENSE fileComment: Holding destination address attributes------------------------------------------------------------------------------*/package org.xmlBlaster.util.def;import java.util.logging.Logger;import org.xmlBlaster.jms.XBConnectionMetaData;/** * Holding some Constants * See xmlBlaster/src/c++/util/Constants.h * <p> * Probably we should change the code to use the * <a href="http://developer.java.sun.com/developer/JDCTechTips/2001/tt0807.html">enum pattern</a> * for some of the constants in this class * </p> */public class Constants { public static final String UTF8_ENCODING="UTF-8"; public static final String DEFAULT_SECURITYPLUGIN_TYPE = "htpasswd"; public static final String DEFAULT_SECURITYPLUGIN_VERSION = "1.0"; public final static long MINUTE_IN_MILLIS = 1000L*60; public final static long HOUR_IN_MILLIS = MINUTE_IN_MILLIS*60; public final static long DAY_IN_MILLIS = HOUR_IN_MILLIS * 24; public final static long WEEK_IN_MILLIS = DAY_IN_MILLIS * 7; public final static String EMAIL_TRANSFER_ENCODING = "Content-Transfer-Encoding"; public final static String ENCODING_BASE64 = "base64"; public final static String ENCODING_FORCE_PLAIN = "forcePlain"; public final static String ENCODING_QUOTED_PRINTABLE = "quoted-printable"; public final static String ENCODING_NONE = null; public final static String TYPE_STRING = "String"; // is default, same as "" public final static String TYPE_BLOB = "byte[]"; /* See JMS types */ public final static String TYPE_BOOLEAN = "boolean"; public final static String TYPE_BYTE = "byte"; public final static String TYPE_DOUBLE = "double"; public final static String TYPE_FLOAT = "float"; public final static String TYPE_INT = "int"; public final static String TYPE_SHORT = "short"; public final static String TYPE_LONG = "long"; /** used to tell that the entry is really null (not just empty) */ public final static String TYPE_NULL = "null"; // Used to lookup in global.getObjectEntry(OBJECT_ENTRY_ServerScope) public final static String OBJECT_ENTRY_ServerScope = "ServerNodeScope"; /** * The SOCKET protocol can support zlib compression with streaming compression * A partial flush means that all data will be output, * but the next packet will continue using compression tables from the end of the previous packet. * As described in [RFC-1950] and in [RFC-1951] * @see http://www.jcraft.com/jzlib/ */ public final static String COMPRESS_ZLIB_STREAM = "zlib:stream"; /** * The SOCKET protocol supports zlib compression for each message individually * As described in [RFC-1950] and in [RFC-1951] * @see http://www.jcraft.com/jzlib/ */ public final static String COMPRESS_ZLIB = "zlib"; /** * The native authentication instance of the xmlBlaster server is available * under this key in Global.instance().getProperties(). * <pre> * </pre> */ public final static String I_AUTHENTICATE_PROPERTY_KEY = "/xmlBlaster/I_Authenticate"; /** * The IANA registered xmlBlaster port, * see <a href="http://www.iana.org/assignments/port-numbers">IANA Port Numbers</a> * and <a href="http://andrew.triumf.ca/cgi-bin/port">Network Service Query</a>. * <pre> * xmlblaster 3412/tcp xmlBlaster * xmlblaster 3412/udp xmlBlaster * # Marcel Ruff <xmlBlaster@marcelruff.info> February 2002 * </pre> */ public static final int XMLBLASTER_PORT = 3412; /** * The xmlBlaster SNMP node 11662 registered at IANA. * <p /> * XmlBlaster has a registered SNMP number under iso.org.dod.internet.private.enterprise (1.3.6.1.4.1), * our tree leaf is 1.3.6.1.4.1.11662<br /> * Returns 11662 * @see <a href="http://www.iana.org/assignments/enterprise-numbers" target="others">PRIVATE ENTERPRISE NUMBERS</a> */ public static final int XMLBLASTER_SNMP = 11662; /** * The xmlBlaster SNMP node 1.3.6.1.4.1.11662 as registered at IANA. * <br /> * Returns a long array containing the SNMP hierarchy to xmlBlaster */ public static final long[] XMLBLASTER_OID_ROOT = { 1, 3, 6, 1, 4, 1, Constants.XMLBLASTER_SNMP }; // 11662 // Status id, on error usually an exception is thrown so we don't need "ERROR": /** The returned message status if OK */ public final static String STATE_OK = "OK"; // UpdateReturnQos uq = new UpdateReturnQos(glob); // return uq.toXml(); should be somehow similar to RET_OK? public final static String RET_OK = "<qos><state id='" + Constants.STATE_OK + "'/></qos>"; public final static String INFO_INITIAL = "INITIAL"; /** ConnectQos transports in its QoS clientProperty an optional flag to suppress cb ping */ public final static String CLIENTPROPERTY_INITIAL_CALLBACK_PING = "__initialCallbackPing"; /** * If this clientProperty is send with ConnectQos the clientProperties are * copied to the SessionInfo.remoteProperty map (which are manipulatable by jconsole and EventPlugin) */ public final static String CLIENTPROPERTY_REMOTEPROPERTIES = "__remoteProperties"; /* C-client if queued on client side: "<qos><state id='OK' info='QUEUED'/></qos>" */ public final static String STATE_WARN = "WARNING"; public final static String RET_WARN = "<qos><state id='" + Constants.STATE_WARN + "'/></qos>"; /** The returned message status if message is stale (that is old but not erased yet) */ //public final static String STATE_STALE = "STALE"; // needs to be implemented as another message timer TODO!!! //public final static String RET_STALE = "<qos><state id='" + Constants.STATE_STALE + "'/></qos>"; /** The returned message status if message timeout occurred (but not erased) */ public final static String STATE_TIMEOUT = "TIMEOUT"; public final static String RET_TIMEOUT = "<qos><state id='" + Constants.STATE_TIMEOUT + "'/></qos>"; /** The returned message status if message is expired (timeout occurred and is erased) */ public final static String STATE_EXPIRED = "EXPIRED"; public final static String RET_EXPIRED = "<qos><state id='" + Constants.STATE_EXPIRED + "'/></qos>"; /** The returned message status if message is explicitly erased by a call to erase() */ public final static String STATE_ERASED = "ERASED"; public final static String RET_ERASED = "<qos><state id='" + Constants.STATE_ERASED + "'/></qos>"; /** The returned message status if message couldn't be forwarded to the master cluster node */ public final static String STATE_FORWARD_ERROR = "FORWARD_ERROR"; public final static String RET_FORWARD_ERROR = "<qos><state id='" + Constants.STATE_FORWARD_ERROR + "'/></qos>"; /** Additional info for state. The returned message status if message couldn't be forwarded to the master cluster node but is in the tail back queue to be delivered on reconnect or on client side message recording. */ public final static String INFO_QUEUED = "QUEUED"; /** Type of a message callback queue */ public final static String RELATING_CALLBACK = "callback"; /** Type of a message callback queue */ public final static String RELATING_SUBJECT = "subject"; /** Type of a message queue on client side */ public final static String RELATING_CLIENT = "connection"; /** Type of a message queue on client side for updates (not really a type but used for id) */ public final static String RELATING_CLIENT_UPDATE = "clientUpdate"; /** Type of a history message queue containing references on messages */ public final static String RELATING_HISTORY = "history"; /** Type of a subscription message queue containing subscriptions */ public final static String RELATING_SUBSCRIBE = "subscribe"; /** Type of a subscription message queue containing sessions */ public final static String RELATING_SESSION = "session"; /** MessageUnit cache */ public final static String RELATING_MSGUNITSTORE = "msgUnitStore"; /** Topics persistence */ public final static String RELATING_TOPICSTORE = "topicStore"; /* message queue onOverflow handling, blocking until queue takes messages again (client side) */ public final static String ONOVERFLOW_BLOCK = "block"; /** message queue onOverflow handling */ public final static String ONOVERFLOW_DEADMESSAGE = "deadMessage"; /** message queue onOverflow handling */ public final static String ONOVERFLOW_DISCARD = "discard"; /** message queue onOverflow handling */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -