Package org.jeyzer.publish.event
Class JzrStandardEvent
- java.lang.Object
-
- org.jeyzer.publish.event.JzrStandardEvent
-
- All Implemented Interfaces:
java.lang.Cloneable,JzrEvent
public class JzrStandardEvent extends java.lang.Object implements JzrEvent
The Jeyzer standard event class is a generic bean representing a Jeyzer applicative monitoring event. Class can be used immediately in a a generic manner or extended.
Non thread safe
Events are created by the application and published through the Jeyzer Monitor handlers.
The code and id must always be set otherwise the event will not get processed when fired or started.
The event id is automatically set by concatenating the given code name and current system time. All other parameters are optional.
-
-
Field Summary
Fields Modifier and Type Field Description protected JzrEventCodecodeprotected java.lang.Stringidprotected java.lang.Stringmessageprotected shorttrustFactor
-
Constructor Summary
Constructors Constructor Description JzrStandardEvent(JzrEventCode code)The Jeyzer event constructorJzrStandardEvent(JzrEventCode code, java.lang.String message)The Jeyzer event constructorJzrStandardEvent(JzrEventCode code, java.lang.String message, short trustFactor)The Jeyzer event constructorJzrStandardEvent(JzrStandardEvent event)The Jeyzer cloning constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Clone the event.JzrEventCodegetCode()Get the applicative event code.java.lang.StringgetId()Get the applicative event unique id.java.lang.StringgetMessage()Get the applicative event message.shortgetTrustFactor()Get the applicative event trust factor.voidsetTrustFactor(short trustFactor)Set the applicative event trust factor.
-
-
-
Field Detail
-
code
protected JzrEventCode code
-
id
protected java.lang.String id
-
message
protected java.lang.String message
-
trustFactor
protected short trustFactor
-
-
Constructor Detail
-
JzrStandardEvent
public JzrStandardEvent(JzrEventCode code)
The Jeyzer event constructor- Parameters:
code- the applicative code. Mandatory
-
JzrStandardEvent
public JzrStandardEvent(JzrEventCode code, java.lang.String message)
The Jeyzer event constructor- Parameters:
code- the applicative code. Mandatorymessage- the applicative event message (description, recommendation). Can be null.
-
JzrStandardEvent
public JzrStandardEvent(JzrEventCode code, java.lang.String message, short trustFactor)
The Jeyzer event constructor- Parameters:
code- the applicative code. Can be nullmessage- the applicative event message (description, recommendation). Can be null.trustFactor- the applicative trust factor. Between 0 and 100.
-
JzrStandardEvent
public JzrStandardEvent(JzrStandardEvent event)
The Jeyzer cloning constructor- Parameters:
event- the applicative event to clone.
-
-
Method Detail
-
getCode
public JzrEventCode getCode()
Get the applicative event code. Can be null.
-
getId
public java.lang.String getId()
Get the applicative event unique id.
-
getMessage
public java.lang.String getMessage()
Get the applicative event message. Can be null.- Specified by:
getMessagein interfaceJzrEvent- Returns:
- the applicative event message
-
getTrustFactor
public short getTrustFactor()
Get the applicative event trust factor.- Specified by:
getTrustFactorin interfaceJzrEvent- Returns:
- the applicative event trust factor
-
setTrustFactor
public void setTrustFactor(short trustFactor)
Set the applicative event trust factor.- Parameters:
trustFactor- the applicative event trust factor
-
-