com.ibm.wsspi.monitoring
Interface EventSourceContext


public interface EventSourceContext

Provides the context for a monitored component. It can create event sources, and information about the monitored component.

See Also:
EventSource

Nested Class Summary
static interface EventSourceContext.Factory
           
 
Field Summary
static java.lang.String COPYRIGHT
           
static EventSourceContext.Factory Factory
           
static java.lang.String SessionKey
           
 
Method Summary
 boolean blockExceptions(boolean isBlockExceptions)
          Direct monitoring to be block event publishing exceptions for the artifact monitored by this event source context.
 java.lang.String getAttribute(java.lang.String key)
          Return the value of the requested attribute, as is defined for this context in the mon file.
 java.util.Map getAttributes()
          Return the attributes defined for this context in the mon file.
 org.apache.xml.utils.QName getComponentQName()
           
 org.apache.xml.utils.QName getComponentTypeQName()
           
 com.ibm.websphere.cem.ECSEmitter getECSEmitter(java.lang.String ecsID)
          Deprecated.  
 EventSource getEventSource(java.lang.String elementKind, java.lang.String elementName)
          Returns an event source for a monitored element.
 java.util.logging.Logger getLogger()
           
 boolean hasDefaultEventsDisabled()
           
 boolean hasDefaultEventsEnabled()
           
 boolean hasMonitor()
           
 boolean isBlockExceptions()
           
 boolean isOverridingDefaults()
           
 

Field Detail

COPYRIGHT

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

Factory

public static final EventSourceContext.Factory Factory

SessionKey

public static final java.lang.String SessionKey
Method Detail

getEventSource

public EventSource getEventSource(java.lang.String elementKind,
                                  java.lang.String elementName)
Returns an event source for a monitored element.

Parameters:
elementKind - element kinds are specified for each component kind in the .mes file, for example for a Map transformation "Transformation"
elementName - the name of the monitored element e.g. "/ClarifyToGenericAddress/1" this name is used also in the .mon file
Returns:
the event source object that encapsulates the wbi component element to be monitored

getComponentTypeQName

public org.apache.xml.utils.QName getComponentTypeQName()

getComponentQName

public org.apache.xml.utils.QName getComponentQName()

getLogger

public java.util.logging.Logger getLogger()

getAttribute

public java.lang.String getAttribute(java.lang.String key)
Return the value of the requested attribute, as is defined for this context in the mon file.

Parameters:
key -
Returns:
the value of the attribute or null if the attribute is not set

getAttributes

public java.util.Map getAttributes()
Return the attributes defined for this context in the mon file.

Returns:
the attributes, never null.

isOverridingDefaults

public boolean isOverridingDefaults()
Returns:
- if any event points are overriding the default no matter it's turned on or off dynamically or staticaly (.mon) return true, otherwise returns false

hasMonitor

public boolean hasMonitor()
Returns:
- if a monitor spec is deployed for the component represented by this event source context return true, otherwise return false

getECSEmitter

public com.ibm.websphere.cem.ECSEmitter getECSEmitter(java.lang.String ecsID)
Deprecated.  

Return a new ECSEmitter instance populated with the supplied event correlation sphere ID

Parameters:
ecsID - - event correlation sphere ID. it can be null, In that case, the current ECS ID is used.
Returns:
a new ECSEmitter

hasDefaultEventsEnabled

public boolean hasDefaultEventsEnabled()
Returns:
true if the monitoring spec represented by this object allows firing of default events.

hasDefaultEventsDisabled

public boolean hasDefaultEventsDisabled()
Returns:
true if the monitoring spec represented by this object doesn't allow firing of default events.

blockExceptions

public boolean blockExceptions(boolean isBlockExceptions)
Direct monitoring to be block event publishing exceptions for the artifact monitored by this event source context. Note that this is an artifact level setting and not a component kind setting.

Event blocking can be adjusted for each monitored artifact separately. By default monitoring blocks all event publishing exceptions.

Parameters:
isBlockExceptions - if true no exceptions are raised for event publishing failures, if set to false, a RuntimeException is raised with the cause set to the originating exception, the wrappering is neccessary because the originating exception may be a checked exception
Returns:
the old value

isBlockExceptions

public boolean isBlockExceptions()