public interface AuditEvent extends Event, Serializable, Comparable<AuditEvent>
This interface defines an abstract audit-event. Specifying events as
interface aims at several optimized implementations. A simple one can be
found at AuditEventImpl.
This interface also defines several event properties, which are beyond the set of variables supported by.
| Modifier and Type | Field and Description |
|---|---|
static String |
AGE
This is a special variable, which refers to the age of the event in
milliseconds with regard to the moment the variable is accessed (i.e.
|
static String |
EVENT_ID |
static String |
EVENT_TAGS
The collection key for storing all tags for an event
|
static String |
EVENT_URL |
static String |
FILE
This variable holds the path where the event is stored
|
static String |
FILE_OFFSET
This variable indicates the offset (in bytes) from the beginning of the
file where this event is stored
|
static String |
ID |
static String |
MESSAGE |
static String |
RECEIVED_AT
A key denoting the time an event has been received
|
static String |
SENSOR
This simply serves as alias for SENSOR_NAME
|
static String |
SENSOR_ADDR |
static String |
SENSOR_ID
This variable holds the ID of the sensor from which this event was
received (if available)
|
static String |
SENSOR_NAME
This variable holds the name of the sensor from which this event was
received (if available)
|
static String |
SENSOR_TYPE |
static String |
SESSION_ID |
static String |
SEVERITY |
static String |
SITE_ID
This variable denotes the site-id to which this event is mapped
|
static String |
SITE_NAME
This variable references the site-name to which this event is mapped
|
static String |
SIZE |
static String |
TAGS |
static String[] |
VARIABLES |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(AuditEvent o) |
String |
get(String var)
Returns the given variable as
String or an empty string if
the variable is not set. |
List<String> |
getAll(String var)
This method returns the list of a collection which if referenced by the
given variable
var. |
AuditEventType |
getAuditEventType() |
Date |
getDate()
Returns the date of this events birth.
|
String |
getEventId()
The unique ID, created by modsecurity.
|
AuditEventMessage[] |
getEventMessages() |
String[] |
getRawData()
Deprecated.
|
String |
getSection(int i)
Returns the string, which contains the whole section of this audit-event.
|
String |
getSessionId()
Deprecated.
Use
get( "SESSION_ID" ); instead. |
List<String> |
getVariables()
This method returns the list of all variables available in this event.
|
boolean |
isSet(String var)
Checks wether the given variable is set or not.
|
void |
set(String variable,
String value)
This method can be used to modify/set properties of the event.
|
void |
setAll(String variable,
List<String> values)
This method can be used to modify/set a collection of the event.
|
void |
setSessionId(String id)
Deprecated.
Use
set( "SESSION_ID", id ) instead. |
getTimestamp, getTypestatic final String ID
static final String EVENT_ID
static final String EVENT_TAGS
static final String RECEIVED_AT
static final String AGE
static final String SENSOR_ID
static final String SENSOR_NAME
static final String SENSOR
static final String SENSOR_ADDR
static final String SENSOR_TYPE
static final String SITE_ID
static final String SITE_NAME
static final String FILE
static final String EVENT_URL
static final String FILE_OFFSET
static final String SIZE
static final String TAGS
static final String SEVERITY
static final String MESSAGE
static final String SESSION_ID
static final String[] VARIABLES
String getEventId()
String getSection(int i)
ModSecurity.java.i - Index of the section as defined by
ModSecurity.SECTION_*.Date getDate()
String getSessionId()
get( "SESSION_ID" ); instead.void setSessionId(String id)
set( "SESSION_ID", id ) instead.id - The id of the session with which this event is associated.boolean isSet(String var)
var - The name of the variable that is checked.true iff the variable is set.String get(String var)
String or an empty string if
the variable is not set. If the given variable is referring to a
collection the first value of that collection is returned.
To test if a variable has been set, use
isSet(String variable).List<String> getAll(String var)
var.var - The variable name of the collection. May also be a
non-collection variable in which case a single-item list will
returned if the variable has a value.NULL if no
collection is found by that variable name.void set(String variable, String value)
void setAll(String variable, List<String> values)
variable - values - List<String> getVariables()
int compareTo(AuditEvent o)
compareTo in interface Comparable<AuditEvent>String[] getRawData()
AuditEventMessage[] getEventMessages()
AuditEventType getAuditEventType()
Copyright © 2014 jwall.org. All Rights Reserved.