com.ibm.wsspi.monitoring

Interface EventPoint


  1. 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

Modifier and Type Field and Description
  1. static
  2. java.lang.String
COPYRIGHT

Method Summary

Modifier and Type Method and Description
  1. void
fire(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent cbe)
Deprecated. use EventPoint#fire(java.lang.String[], java.lang.Object[])
  1. 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.
  1. 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
  1. void
fire(java.lang.String[] names,java.lang.Object[] values)
Fires a monitoring event
  1. void
fire(java.lang.String name,java.lang.Object value)
Fires a monitoring event
  1. 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
  1. void
forceFiringEventWithPayloadType(java.lang.String payloadType)
fix defect 461059.
  1. com.ibm.wsspi.monitoring.Encoder
getEncoder()
Deprecated. use EventPoint#fire(java.lang.String[], java.lang.Object[])
  1. 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.
  1. EventSource
getEventSource()
  1. java.lang.String
getName()
  1. java.lang.String
getTXMode()
  1. boolean
isEnabled()
  1. 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.
  1. void
setTXMode(java.lang.String tx_mode)
All events fired from this event point will be published within the indicated transaction mode.
  1. void
subscribe(java.lang.String listenerid)
When there is no mon file, this method can be use to create subscribe to events from this eventpoint.

Field Detail

  1. static final java.lang.String COPYRIGHT
See Also:

Method Detail

getName

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

getEventSource

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

setTXMode

  1. 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

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

setEventProperty

  1. java.lang.String setEventProperty( java.lang.String target,
  2. java.lang.String property,
  3. java.lang.String value)
  4. 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

  1. java.lang.String getEventProperty( java.lang.String target,
  2. 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

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

fire

  1. void fire(java.lang.String name,
  2. 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

  1. void fire(java.lang.String firstName,
  2. java.lang.String secondName,
  3. java.lang.Object firstValue,
  4. 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

  1. void fire(java.lang.String[] names,
  2. java.lang.Object[] values)
Fires a monitoring event
Parameters:
names - payload element names
values - payload element values

fire

  1. void fire(com.ibm.websphere.cem.ECSEmitter emitter,
  2. java.lang.String[] names,
  3. 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

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

fire

  1. void fire(com.ibm.websphere.cem.ECSEmitter emitter,
  2. 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

  1. 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

  1. 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.

subscribe

  1. void subscribe(java.lang.String listenerid)
When there is no mon file, this method can be use to create subscribe to events from this eventpoint.
Parameters:
listenerid - Identifies the listener that will receive the events. ListernerFactory.CEI61FORMAT is the only supported listener id