Package com.priint.pubserver.tracing
Class TracerMessage
java.lang.Object
com.priint.pubserver.tracing.TracerMessage
- All Implemented Interfaces:
Serializable
Message Class which contains a trace message
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of Message types -
Constructor Summary
ConstructorsConstructorDescriptionTracerMessage(String sessionId, String type, String user, String message, String hint, String source, Date timestamp) TracerMessage(String sessionId, String type, String user, String message, String hint, String source, Date timestamp, String documentId, String publicationId) -
Method Summary
Modifier and TypeMethodDescriptiongetHint()intgetId()Get unique trace message id (created on insert by the database).Get message of the trace messageGet sessionId of the trace messagegetType()Get type of the trace messagegetUser()Get user of the session.voidsetDocumentId(String documentId) Set documentIdvoidvoidsetId(int id) Set unique trace message id (usually created on insert by the database)voidsetMessage(String message) voidsetPublicationId(String publicationId) Set publicationIdvoidsetSessionId(String sessionId) Set session id of the trace messagevoidvoidsetTimestamp(Date timestamp) Set creation date and time of the message.voidSet type of the trace message.voidtoString()returns trace message with: type, source, message, hint
-
Constructor Details
-
TracerMessage
public TracerMessage(String sessionId, String type, String user, String message, String hint, String source, Date timestamp) - Parameters:
sessionId- id of the publishing server sessiontype- Message type (info, error, warning). Use MessageType.toString() method for getting the correct label.user- name of the logged in usermessage- textual message describing the eventhint- optional text describing measures to be taken, when this event occurssource- code source generating this eventtimestamp- date time when this event occurred
-
TracerMessage
public TracerMessage(String sessionId, String type, String user, String message, String hint, String source, Date timestamp, String documentId, String publicationId) - Parameters:
sessionId- id of the publishing server sessiontype- Message type (info, error, warning). Use MessageType.toString() method for getting the correct label.user- user name of the logged in usermessage- textual message describing the eventhint- optional text describing measures to be taken, when this event occurssource- code source generating this eventtimestamp- date time when this event occurreddocumentId- identifier of the documentpublicationId- identifier of the publication
-
-
Method Details
-
getId
public int getId()Get unique trace message id (created on insert by the database).- Returns:
- id
-
setId
public void setId(int id) Set unique trace message id (usually created on insert by the database)- Parameters:
id-
-
getSessionId
Get sessionId of the trace message- Returns:
- sessionId
-
setSessionId
Set session id of the trace message- Parameters:
sessionId-
-
getType
Get type of the trace message- Returns:
- type as string
- See Also:
-
setType
Set type of the trace message.- Parameters:
type- as string- See Also:
-
getUser
Get user of the session.- Returns:
- user name
-
setUser
- Parameters:
user- name
-
getMessage
Get message of the trace message- Returns:
- message text
-
setMessage
- Parameters:
message- text
-
getHint
- Returns:
- hint
-
setHint
- Parameters:
hint-
-
getSource
- Returns:
- source
-
setSource
- Parameters:
source-
-
getTimestamp
- Returns:
- creation date and time of the message
-
setTimestamp
Set creation date and time of the message.- Parameters:
timestamp-
-
getDocumentId
- Returns:
- Document id
-
setDocumentId
Set documentId- Parameters:
documentId- text
-
getPublicationId
- Returns:
- Publication id
-
setPublicationId
Set publicationId- Parameters:
publicationId- text
-
toString
returns trace message with: type, source, message, hint
-