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(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
 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

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

getName

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

getEventSource

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

setTXMode

public 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

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

setEventProperty

public 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

public 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

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

fire

public 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

public 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

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

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

fire

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

Parameters:
cbe -

fire

public 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

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