ilog.server.jcomp
Class SvMsg

java.lang.Object
  |
  +--ilog.server.jcomp.SvMsg
All Implemented Interfaces:
ilog.server.jcomp.Streamable

public final class SvMsg
extends java.lang.Object
implements ilog.server.jcomp.Streamable

This class enables you to specify a message level identifier and description. It also defines the message identifier allocation policy:

0 to 199
reserved for generic errors detected on the server side
200 to 399
reserved for generic errors detected on the component side
400 to 599
reserved for generic errors detected on the Rogue Wave Views Data Access side
600 to 999
reserved for generic errors (not yet used)
1000 to 1999
application specific errors


Field Summary
static int APPLI_DEBUG
          A debug message from the application.
static int APPLI_ERROR
          An error message from the application.
static int APPLI_INFO
          An information message from the application.
static int APPLI_MSG_MIN
           
static int APPLI_WARN
          A warning message from the application.
static int COMPONENT_MSG_MIN
           
 java.lang.String data
          The message description.
 int identifier
          The message identifier.
 int level
          The message level, it can be used for filtering purpose.
static int MAX_ID
          The maximum identifier that may be used by the user.
static int MV_DEBUG
          Debug level.
static int MV_ERROR
          Error level.
static int MV_INFO
          Information level.
static int MV_WARNING
          Warning level.
static int NOT_YET_USED_MIN
           
static int NULL_MSG_MIN
           
static int PTCL_MSG_MIN
           
static int SERVER_MSG_MIN
           
 
Method Summary
static SvMsg AppliDebug(java.lang.String msg)
          Equivalent to new SvMsg(APPLI_DEBUG,SvMsg.MV_DEBUG,msg)
static SvMsg AppliError(java.lang.String msg)
          Equivalent to new SvMsg(APPLI_ERROR,SvMsg.MV_ERROR,msg)
static SvMsg AppliInfo(java.lang.String msg)
          Equivalent to new SvMsg(APPLI_INFO,SvMsg.MV_INFO,msg)
static SvMsg AppliWarning(int id)
           
static SvMsg AppliWarning(java.lang.String msg)
          Equivalent to new SvMsg(APPLI_WARN,SvMsg.MV_WARNING,msg)
static java.lang.String Get(int id)
          Gets the message associated with id, returns null if (id>MAX_ID) or if the message is not set.
static boolean Set(int id, java.lang.String msg)
          Sets the default message associated with an identifier.
 MvMessage stream(MvMessage msg)
           
 java.lang.String toString()
          Returns a String representation of the message with the format : [] : description
static SvMsg Unstream(MvMessage msg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_MSG_MIN

public static final int NULL_MSG_MIN

PTCL_MSG_MIN

public static final int PTCL_MSG_MIN

SERVER_MSG_MIN

public static final int SERVER_MSG_MIN

COMPONENT_MSG_MIN

public static final int COMPONENT_MSG_MIN

NOT_YET_USED_MIN

public static final int NOT_YET_USED_MIN

APPLI_MSG_MIN

public static final int APPLI_MSG_MIN

APPLI_INFO

public static final int APPLI_INFO
An information message from the application.

APPLI_WARN

public static final int APPLI_WARN
A warning message from the application.

APPLI_ERROR

public static final int APPLI_ERROR
An error message from the application.

APPLI_DEBUG

public static final int APPLI_DEBUG
A debug message from the application.

MAX_ID

public static final int MAX_ID
The maximum identifier that may be used by the user.

MV_INFO

public static final int MV_INFO
Information level.

MV_WARNING

public static final int MV_WARNING
Warning level.

MV_ERROR

public static final int MV_ERROR
Error level.

MV_DEBUG

public static final int MV_DEBUG
Debug level.

identifier

public int identifier
The message identifier.

level

public int level
The message level, it can be used for filtering purpose.

Levels from 1 to 10 are reserved by Rogue Wave Server. These reserved levels includes MV_INFO, MV_WARNING, MV_ERROR and MV_DEBUG and are handled in a specific way by Rogue Wave Server. You should use them when appropriate.

data

public java.lang.String data
The message description.
Method Detail

AppliInfo

public static SvMsg AppliInfo(java.lang.String msg)
Equivalent to new SvMsg(APPLI_INFO,SvMsg.MV_INFO,msg)

AppliWarning

public static SvMsg AppliWarning(java.lang.String msg)
Equivalent to new SvMsg(APPLI_WARN,SvMsg.MV_WARNING,msg)

AppliWarning

public static SvMsg AppliWarning(int id)

AppliError

public static SvMsg AppliError(java.lang.String msg)
Equivalent to new SvMsg(APPLI_ERROR,SvMsg.MV_ERROR,msg)

AppliDebug

public static SvMsg AppliDebug(java.lang.String msg)
Equivalent to new SvMsg(APPLI_DEBUG,SvMsg.MV_DEBUG,msg)

toString

public java.lang.String toString()
Returns a String representation of the message with the format : [] : description
Overrides:
toString in class java.lang.Object

stream

public MvMessage stream(MvMessage msg)
Specified by:
stream in interface ilog.server.jcomp.Streamable

Unstream

public static SvMsg Unstream(MvMessage msg)

Set

public static boolean Set(int id,
                          java.lang.String msg)
Sets the default message associated with an identifier.
Parameters:
id: - The identifier.
msg: - The message.
See Also:
MAX_ID, Get(int)

Get

public static java.lang.String Get(int id)
Gets the message associated with id, returns null if (id>MAX_ID) or if the message is not set.
Parameters:
id: - The identifier.
See Also:
MAX_ID, Set(int, java.lang.String)