IBM WebSphere Application ServerTM
Release 7

com.ibm.wsspi.monitoring
Interface EventPoint


public interface EventPoint

An EventPoint is used to fire monitoring events. The client of an event point needs to know the payload of the fired events. The payload is specified in the event catalog for each component kind exists an .es file specifying the event payloads. A monitorable component defines the event points. Each event point defines an event payload.


Field Summary
static java.lang.String COPYRIGHT
           
 
Method Summary
 void fire(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent cbe)
          Deprecated. use EventPoint#fire(java.lang.String[], java.lang.Object[])
 void fire(com.ibm.websphere.cem.ECSEmitter emitter, org.eclipse.hyades.logging.events.cbe.CommonBaseEvent cbe)
          Deprecated. use EventPoint#fire(java.lang.String[], java.lang.Object[]) Fires a monitoring event by emitting a cbe using the supplied emitter.
 void fire(com.ibm.websphere.cem.ECSEmitter emitter, java.lang.String[] names, java.lang.Object[] values)
          Deprecated. this API should be replaced ASAP, instead the ECSEmitter the correlators as params
 void fire(java.lang.String[] names, java.lang.Object[] values)
          Fires a monitoring event
 void fire(java.lang.String name, java.lang.Object value)
          Fires a monitoring event
 void fire(java.lang.String firstName, java.lang.String secondName, java.lang.Object firstValue, java.lang.Object secondValue)
          Fires a monitoring event, it is a conveniance method for payloads with two data elements
 void forceFiringEventWithPayloadType(java.lang.String payloadType)
          fix defect 461059.
 com.ibm.wsspi.monitoring.Encoder getEncoder()
          Deprecated. use EventPoint#fire(java.lang.String[], java.lang.Object[])
 java.lang.String getEventProperty(java.lang.String target, java.lang.String property)
          Returns the value of the event publishing property for all events from this event point.
 EventSource getEventSource()
           
 java.lang.String getName()
           
 java.lang.String getTXMode()
           
 boolean isEnabled()
           
 java.lang.String setEventProperty(java.lang.String target, java.lang.String property, java.lang.String value)
          Sets event publishing bo_properties for all events from this event point; this method fails.
 void setTXMode(java.lang.String tx_mode)
          All events fired from this event point will be published within the indicated transaction mode.
 

Field Detail

COPYRIGHT

static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
Returns:
the name of the event point

getEventSource

EventSource getEventSource()
Returns:
returns the event source of this object

setTXMode

void setTXMode(java.lang.String tx_mode)
All events fired from this event point will be published within the indicated transaction mode. The default behavior is to fire FailureReasons in a new transaction, and all other events in the same transaction. The way to get the tx_mode (in lack of jdk1.5 enums) is

import com.ibm.wsspi.monitoring.metadata.EventNature;

EventNature.TX_NEW, or EventNature.TX_SAME

Setting the transaction mode to null resets the default behavior.


getTXMode

java.lang.String getTXMode()
Returns:
the current transaction mode of this event point or null, if none was set.

setEventProperty

java.lang.String setEventProperty(java.lang.String target,
                                  java.lang.String property,
                                  java.lang.String value)
                                  throws java.lang.IllegalArgumentException
Sets event publishing bo_properties for all events from this event point; this method fails.

Parameters:
target - only "CEI" is supported
property - only "ExtensionName" is supported
value - is the new property value, null unsets the property;
Returns:
the old value of the property for the same target
Throws:
java.lang.IllegalArgumentException - - In case of unsupported param values are used

getEventProperty

java.lang.String getEventProperty(java.lang.String target,
                                  java.lang.String property)
Returns the value of the event publishing property for all events from this event point. Null is returned if the property is not set.

Parameters:
target - only "CEI" is supported
property - only "ExtensionName" is supported
Returns:
the value of the property for the specified target, or null if no such property is set

isEnabled

boolean isEnabled()
Returns:
true if this point fires monitoring events

fire

void fire(java.lang.String name,
          java.lang.Object value)
Fires a monitoring event

Parameters:
name - the name of the payload data element - it is the name used in the event catalog for this extended data element
value - the value of the payload data element

fire

void fire(java.lang.String firstName,
          java.lang.String secondName,
          java.lang.Object firstValue,
          java.lang.Object secondValue)
Fires a monitoring event, it is a conveniance method for payloads with two data elements

Parameters:
firstName -
secondName -
firstValue -
secondValue -

fire

void fire(java.lang.String[] names,
          java.lang.Object[] values)
Fires a monitoring event

Parameters:
names - payload element names
values - payload element values

fire

void fire(com.ibm.websphere.cem.ECSEmitter emitter,
          java.lang.String[] names,
          java.lang.Object[] values)
Deprecated. this API should be replaced ASAP, instead the ECSEmitter the correlators as params

Parameters:
emitter - manages the correlators
names - payload element names
values - payload element values

fire

void fire(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent cbe)
Deprecated. use EventPoint#fire(java.lang.String[], java.lang.Object[])

Parameters:
cbe -

fire

void fire(com.ibm.websphere.cem.ECSEmitter emitter,
          org.eclipse.hyades.logging.events.cbe.CommonBaseEvent cbe)
Deprecated. use EventPoint#fire(java.lang.String[], java.lang.Object[]) Fires a monitoring event by emitting a cbe using the supplied emitter.

Parameters:
emitter -
cbe -

getEncoder

com.ibm.wsspi.monitoring.Encoder getEncoder()
Deprecated. use EventPoint#fire(java.lang.String[], java.lang.Object[])

This method supports the deprecated fire methods taking a CBE as parameter

Returns:
the encoder to be used to populate the cbe with payload defined in the component specific event specification (.es file). The encoder will populate the cbe with the maximum payload defined. The maximum is calculated as the maximum defined by the .mon file and the corresponding dynamic setting for CEI or LOG.

forceFiringEventWithPayloadType

void forceFiringEventWithPayloadType(java.lang.String payloadType)
fix defect 461059. this method is used by BPC component to fire business relevant event. the requirement is even the event point is not enabled (no mon file or empty mon fie, not default event,), if the business relevant flag is true, they still need the event to be fired. so we introduced this new SPI for them. when business relevant flag is true, they can call this method before firing events, then monitor runtime will fire event will specified payload. ???If caller does not specified the payload type, then full will be used by default.


IBM WebSphere Application ServerTM
Release 7