|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--asgaard.utils.log.LogMsg
This is a Bean that carries a statement in the LOG - File.
Collection and Distribution of statements within the LogBroker
.
LogBroker
, Serialized FormField Summary | |
static byte |
BEAN_NONE
No Bean included to the Statement |
static byte |
BEAN_NOT_INCLUDED
Bean available at the LogBroker but not included |
static byte |
BEAN_OBJECT
Some complex bean which is some Object |
static byte |
BEAN_STRING
Bean is a simple type and stored as String |
static java.lang.String |
LOCAL_HOST
If the Hostname cannot be resolved |
static byte |
LOG_BACKUP
Log-level "Backup" Statements to ensave information |
static byte |
LOG_DEBUG
Log-level "Debuginformation" to trace processes about different server-tasks |
static byte |
LOG_ERROR
Log-level "Security violation", occour if an anourmalous behavior is detected. |
static byte |
LOG_NONE
Log-level "No Message" |
static byte |
LOG_PROFILE
Log-level "Profile", storing profiling- and evaluation information |
static byte |
LOG_REMARK
Log-level "Remark" by the Server as documentation of the Server-State |
static byte |
LOG_SECURITY
Log-level "Fatal Error", an error occoured and can not be recovered automaticaly |
static byte |
LOG_WARNING
Log-level "Warning", an error occoured and has been repaired automatically but may not work in the intended way (e.g. locally but remote) |
Constructor Summary | |
LogMsg()
Default-constructor, do not use manually - internal use only! |
|
LogMsg(long nr,
java.lang.String host,
java.lang.String server,
java.lang.String point,
java.util.Date c,
java.util.Date d,
byte typ,
boolean ok,
java.lang.String msg,
java.lang.Object bean,
boolean beanExist)
Complete constructor for a historical Statement, do not use manually - internal use only! |
|
LogMsg(java.lang.String server,
java.lang.String point,
byte typ,
boolean ok,
java.lang.String msg)
Manual constructor for a short statement without included streamable object (Bean) |
|
LogMsg(java.lang.String server,
java.lang.String point,
byte typ,
boolean ok,
java.lang.String msg,
java.lang.Object bean)
Manual constructor for a short statement including a streamable object (Bean) |
|
LogMsg(java.lang.String host,
java.lang.String server,
java.lang.String point,
byte typ,
boolean ok,
java.lang.String msg,
java.lang.Object bean)
Manual and automated constructor for a logclients (used in LogClient). |
Method Summary | |
byte |
getBeanType()
Get the type of the Bean included to the Statement |
java.util.Date |
getCreated()
Get Local Time when the Statement was created, precision "seconds/1000" |
java.lang.String |
getHostName()
Get name of the Host the requesting Server is located |
java.lang.Object |
getLogBean()
Get some streamable Object |
java.lang.String |
getLogMessage()
Get human redable Message of the Statement |
long |
getLogNr()
Get number of the Message within the logfile |
byte |
getLogType()
Get the Type of the LOG-Statement |
static java.lang.String |
getLogType(byte type)
Converts the Type of the LOG-Statement |
static byte |
getLogType(java.lang.String type)
Converts the Type of the LOG-Statement |
java.lang.String |
getOk()
Get was the Action successful |
static java.lang.String |
getOk(boolean ok)
Converts boolean to String |
static boolean |
getOk(java.lang.String ok)
Converts String to boolean |
java.util.Date |
getReceived()
Get Local Time when the Statement was processed by the LOG-server, precision "seconds" |
java.lang.String |
getServerClass()
Get the calling Java-Serverclass |
java.lang.String |
getServicePoint()
Get the Method / place where the statement was created |
boolean |
isSuccess()
Get was the Action successful |
void |
setHostName(java.lang.String name)
Set the name of the Host the requesting Server is located, default is the localhost. |
void |
setLogBean(java.lang.Object bean)
Set some streamable object |
void |
setLogMessage(java.lang.String msg)
Set the message to the statement |
void |
setLogNr(long nr)
Set the number of the Message within the logfile, do not use manually - internal use only! |
void |
setLogType(byte val)
Set the Type of the LOG-statement ("Log-level") |
void |
setReceived(java.util.Date ts)
Set the Local Time when the Statement was processed by the LOG-server |
void |
setServerClass(java.lang.String name)
Set the calling Java-Serverclass |
void |
setServicePoint(java.lang.String name)
Set the Method / place where the statement was created |
void |
setSuccess(boolean ok)
Set if the Servicepoint was passed successfuly. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final byte LOG_NONE
public static final byte LOG_SECURITY
public static final byte LOG_ERROR
public static final byte LOG_PROFILE
public static final byte LOG_WARNING
public static final byte LOG_REMARK
public static final byte LOG_BACKUP
public static final byte LOG_DEBUG
public static final byte BEAN_NONE
public static final byte BEAN_NOT_INCLUDED
public static final byte BEAN_OBJECT
public static final byte BEAN_STRING
public static final java.lang.String LOCAL_HOST
Constructor Detail |
public LogMsg()
public LogMsg(java.lang.String server, java.lang.String point, byte typ, boolean ok, java.lang.String msg) throws java.lang.IllegalArgumentException, java.io.NotSerializableException
server
- The calling Java-Serverclasspoint
- The Method / place where the statement was createdtyp
- The Type of the LOG-Statementok
- Was the ServicePoint passed successfulymsg
- Human redable Message of the Statementtyp
does not fit to the log-types definedpublic LogMsg(java.lang.String server, java.lang.String point, byte typ, boolean ok, java.lang.String msg, java.lang.Object bean) throws java.lang.IllegalArgumentException, java.io.NotSerializableException
server
- The calling Java-Serverclasspoint
- The Method / place where the statement was createdtyp
- The Type of the LOG-Statementok
- Was the ServicePoint passed successfulymsg
- Human redable Message of the Statementbean
- Some streamable Objecttyp
does not fit to the log-types definedbean
can not be serializedpublic LogMsg(java.lang.String host, java.lang.String server, java.lang.String point, byte typ, boolean ok, java.lang.String msg, java.lang.Object bean) throws java.lang.IllegalArgumentException, java.io.NotSerializableException
host
- The host where the statement was createdserver
- The calling Java-Serverclasspoint
- The Method / place where the statement was createdtyp
- The Type of the LOG-Statementok
- Was the ServicePoint passed successfulymsg
- Human redable Message of the Statementbean
- Some streamable Objecttyp
does not fit to the log-types definedbean
can not be serializedpublic LogMsg(long nr, java.lang.String host, java.lang.String server, java.lang.String point, java.util.Date c, java.util.Date d, byte typ, boolean ok, java.lang.String msg, java.lang.Object bean, boolean beanExist) throws java.lang.IllegalArgumentException, java.io.NotSerializableException
nr
- Number of the statementhost
- name of the Host the requesting Server is locatedserver
- The calling Java-Serverclasspoint
- The Method / place where the statement was createdc
- Timestamp when the statement was createdd
- Timestamp when the statement was receivedtyp
- The Type of the LOG-Statementok
- Was the ServicePoint passed successfulymsg
- Human redable Message of the Statementbean
- Some streamable ObjectbeanExist
- only used, if bean=null and beantype=BEAN_NOT_INCLUDED)typ
does not fit to the log-types definedbean
can not be serializedLogBroker
Method Detail |
public void setLogNr(long nr)
public void setHostName(java.lang.String name)
public void setServerClass(java.lang.String name)
public void setServicePoint(java.lang.String name)
public void setLogType(byte val) throws java.lang.IllegalArgumentException
public void setReceived(java.util.Date ts)
public void setSuccess(boolean ok)
public void setLogMessage(java.lang.String msg)
public void setLogBean(java.lang.Object bean) throws java.io.NotSerializableException
bean
- the Bean which shall be included to the message, null
setzt the BeanType
to BEAN_NONE
.null
is ignored)public long getLogNr()
public java.lang.String getHostName()
public java.lang.String getServerClass()
public java.lang.String getServicePoint()
public byte getLogType()
public static java.lang.String getLogType(byte type)
the
- asked typepublic static byte getLogType(java.lang.String type)
the
- asked typepublic java.util.Date getCreated()
public java.util.Date getReceived()
public boolean isSuccess()
public java.lang.String getOk()
public static java.lang.String getOk(boolean ok)
boolean
to Stringpublic static boolean getOk(java.lang.String ok)
boolean
public java.lang.String getLogMessage()
public java.lang.Object getLogBean()
public byte getBeanType()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |