com.ibm.wsspi.monitoring
Interface EventSourceContext
All Superinterfaces:
com.ibm.wsspi.monitoring.metadata.MonitoringSpec
- public interface EventSourceContext
- extends com.ibm.wsspi.monitoring.metadata.MonitoringSpec
See Also:
EventSource
Nested Class Summary
Modifier and Type | Interface and Description |
---|---|
|
EventSourceContext.Factory
|
Nested classes/interfaces inherited from interface com.ibm.wsspi.monitoring.metadata.MonitoringSpec |
---|
com.ibm.wsspi.monitoring.metadata.MonitoringSpec.Configuration, com.ibm.wsspi.monitoring.metadata.MonitoringSpec.Loader |
Field Summary
Modifier and Type | Field and Description |
---|---|
|
COPYRIGHT
|
|
Factory
|
|
SessionKey
|
Fields inherited from interface com.ibm.wsspi.monitoring.metadata.MonitoringSpec |
---|
Loader |
Method Summary
Modifier and Type | Method and Description |
---|---|
|
blockExceptions(boolean isBlockExceptions)
Direct monitoring to be block event publishing exceptions for the artifact monitored by this event source context.
|
|
getAttribute(java.lang.String key)
Return the value of the requested attribute, as is defined for this context in the mon file.
|
|
getAttributes()
Return the attributes defined for this context in the mon file.
|
|
getECSEmitter(java.lang.String ecsID)
Deprecated.
|
|
getEventFormat()
return this monitor's event format, the format can be HexBinary, XML or XMLWithSchema.
|
getEventSource(java.lang.String elementKind,java.lang.String elementName)
Returns an event source for a monitored element.
|
|
|
getEventVersion()
return current valid event version. the value can be 6.1 or 6.0.2.
|
|
getLogger()
|
|
hasDefaultEventsDisabled()
|
|
hasDefaultEventsEnabled()
|
|
hasMonitor()
|
|
isBlockExceptions()
|
|
isOverridingDefaults()
|
|
setEventFormat(java.lang.String format)
set event format, it equals to call set event version. the valid input are HexBinary, XML and XMLWithSchema
if inputed value is not HexBinary, XML or XMLWithSchema,it will be ignored.
|
|
setEventVersion(java.lang.String version)
set event version. by default the version is 6.1.if event producers want to use
old format, then they need to call this SPI to set the version to 6.0.2
if inputed value is neither 6.1 nor 6.0.2 ,it will be ignored.
|
Methods inherited from interface com.ibm.wsspi.monitoring.metadata.MonitoringSpec |
---|
getComponentQName, getComponentTypeQName, getConfiguration, getEventSourceArray, getEventSourceContext, getPerspective |
Field Detail
COPYRIGHT
- static final java.lang.String COPYRIGHT
See Also:
Factory
- static final EventSourceContext.Factory Factory
SessionKey
- static final java.lang.String SessionKey
Method Detail
getEventSource
- 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
getLogger
- java.util.logging.Logger getLogger( )
getAttribute
- 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.
Specified by:
getAttribute
in interface com.ibm.wsspi.monitoring.metadata.MonitoringSpec
Parameters:
key
- Returns:
the value of the attribute or null if the attribute is not set
getAttributes
- java.util.Map getAttributes()
Return the attributes defined for this context in the mon file.
Specified by:
getAttributes
in interface com.ibm.wsspi.monitoring.metadata.MonitoringSpec
Returns:
the attributes, never null.
isOverridingDefaults
- 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
- boolean hasMonitor()
Returns:
- if a monitor spec is deployed for the component represented by this event source context return true, otherwise return false
getECSEmitter
- @Deprecated
- 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
- boolean hasDefaultEventsEnabled( )
Specified by:
hasDefaultEventsEnabled
in interface com.ibm.wsspi.monitoring.metadata.MonitoringSpec
Returns:
true if the monitoring spec represented by this object allows firing of default events.
hasDefaultEventsDisabled
- boolean hasDefaultEventsDisabled( )
Specified by:
hasDefaultEventsDisabled
in interface com.ibm.wsspi.monitoring.metadata.MonitoringSpec
Returns:
true if the monitoring spec represented by this object doesn't allow firing of default events.
blockExceptions
- 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
- boolean isBlockExceptions()
getEventVersion
- java.lang.String getEventVersion( )
return current valid event version. the value can be 6.1 or 6.0.2.
Returns:
version.
setEventVersion
- void setEventVersion(java.lang.String version)
set event version. by default the version is 6.1.if event producers want to use
old format, then they need to call this SPI to set the version to 6.0.2
if inputed value is neither 6.1 nor 6.0.2 ,it will be ignored.
Parameters:
version
- getEventFormat
- java.lang.String getEventFormat( )
return this monitor's event format, the format can be HexBinary, XML or XMLWithSchema.
Returns:
event format
setEventFormat
- void setEventFormat(java.lang.String format)
set event format, it equals to call set event version. the valid input are HexBinary, XML and XMLWithSchema
if inputed value is not HexBinary, XML or XMLWithSchema,it will be ignored.
Parameters:
format
- format