IBM WebSphere Application ServerTM
Release 7

com.ibm.websphere.cem
Class ECSEmitter

java.lang.Object
  extended by com.ibm.websphere.cem.ECSEmitter
All Implemented Interfaces:
com.ibm.events.emitter.Emitter

Deprecated. To emit CEI events, instead of calling the APIs of this class, please call WebSphere Application Server CEI APIs directly.

public class ECSEmitter
extends java.lang.Object
implements com.ibm.events.emitter.Emitter


Constructor Summary
ECSEmitter(java.lang.String passedJndiName, java.lang.String _ecsID)
          Deprecated. ECSEmitter constructor.
 
Method Summary
 void addUserDataEvent(java.util.Properties properties)
          Deprecated. Creates and sends a user data event.
 void close()
          Deprecated. Instructs the emitter to release all resources that are owned by this object and dependents.
 org.eclipse.hyades.logging.events.cbe.CommonBaseEvent createCommonBaseEvent(java.lang.String eventName)
          Deprecated. Creates an common base event via eventFactory
 java.lang.String getCurrentEcsID()
          Deprecated. Gets the current ECS ID locally stored on the ECSEmitter instance.
 com.ibm.events.ComponentMetaData getFilterMetaData()
          Deprecated. Used to obtain the filter meta data.
 com.ibm.events.ComponentMetaData getMetaData()
          Deprecated. Used to obtain the emitter component meta data.
 java.lang.String getParentEcsID()
          Deprecated. Gets the parent ECS ID locally stored on the ECSEmitter instance.
 int getSynchronizationMode()
          Deprecated. Allows the caller to determine the current setting for synchronization in this emitter.
 int getTransactionMode()
          Deprecated. Allows the caller to determine the currently active transaction mode.
 boolean hasNoCorrelationData()
          Deprecated.  
 boolean isSynchronizationModeSupported(int arg0)
          Deprecated. Allows the caller to determine if a synchronization mode is supported by this emitter.
 void releaseAndEndECS(java.lang.String ecsID)
          Deprecated. Releases the current ECSEmitter.
 java.lang.String sendEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent arg0)
          Deprecated. Sends an event to the Event Bus.
 java.lang.String sendEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent cbe, int synchMode, int txMod)
          Deprecated. Sends an event to the Event Bus overriding the default emitter behavior with the passed parameters.
 java.lang.String[] sendEvents(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] arg0)
          Deprecated. Sends an array of events to the Event Bus.
 java.lang.String[] sendEvents(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] cbes, int synchMode, int txMode)
          Deprecated. Sends an array of events to the Event Bus overriding the default emitter behavior with the passed parameters.
 void setSynchronizationMode(int arg0)
          Deprecated. Sets the default synchronization mode to use when sending events to the Event Bus.
 void setTempCurrentEcsID(java.lang.String newCurEcsID)
          Deprecated. Overrides the content of the current ECS id that is set in the emitted CBEs.
 void setTempParentEcsID(java.lang.String newParEcsID)
          Deprecated. Overrides the value of the parent ECS id that is set in the emitted CBEs.
 void setTransactionMode(int arg0)
          Deprecated. Sets the transaction mode to use when sending events to the Event Bus.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ECSEmitter

public ECSEmitter(java.lang.String passedJndiName,
                  java.lang.String _ecsID)
           throws com.ibm.websphere.cem.exception.EmitterFactoryCreationException
Deprecated. 
ECSEmitter constructor. This needs to be called to send common base events to CEI. In case the ECSEmitter is called with a new EcsID a new Event Correlation Spheres is opened and the new EcsID is written to the WorkArea to make it persistent.

Parameters:
jndiName - The jndi Name of the emitter factory. If null is specified, then "com/ibm/events/configuration/emitter/Default" is used
_ecsID - The new EcsID in case a new correlation sphere needs to be opened, otherwise null
Throws:
com.ibm.websphere.cem.exception.EmitterFactoryCreationException
Method Detail

sendEvent

public java.lang.String sendEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent arg0)
                           throws com.ibm.events.EventsException
Deprecated. 
Sends an event to the Event Bus. The event will only be sent to the bus if:

Specified by:
sendEvent in interface com.ibm.events.emitter.Emitter
Parameters:
arg0 - the event to be sent to the Event Bus. This may not be null.
Returns:
the global instance ID of the event that was built.
Throws:
com.ibm.events.EventsException - if an error ocurrs during event processing.
See Also:
Emitter.sendEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent)

sendEvent

public java.lang.String sendEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent cbe,
                                  int synchMode,
                                  int txMod)
                           throws com.ibm.events.EventsException
Deprecated. 
Sends an event to the Event Bus overriding the default emitter behavior with the passed parameters. The event will only be sent to the bus if:

Specified by:
sendEvent in interface com.ibm.events.emitter.Emitter
Parameters:
cbe - the event to be sent to the Event Bus. This may not be null.
synchMode - indicates whether the event will be sent synchronously (SynchronizationMode.SYNCHRONOUS) or asynchronously (SynchronizationMode.ASYNCHRONOUS) If synchronous, this call will not return until the event has been processed by the event server. If asynchronous, this call will return as soon as the event emitter has passed the event to the server. To avoid overriding the synchronization mode, pass a value of SynchronizationMode.DEFAULT.
txMod - indicates whether the event emitter should process the event in the current transaction (TransactionMode.SAME) or not (TransactionMode.NEW). To avoid overriding the transaction mode, pass a value of TransactionMode.DEFAULT.
Returns:
the global instance ID of the event that was built.
Throws:
com.ibm.events.EventsException - if an error ocurrs during event processing.
See Also:
Emitter.sendEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent, int, int)

sendEvents

public java.lang.String[] sendEvents(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] arg0)
                              throws com.ibm.events.EventsException
Deprecated. 
Sends an array of events to the Event Bus. The events will only be sent to the bus if:

Specified by:
sendEvents in interface com.ibm.events.emitter.Emitter
Parameters:
arg0 - the array of events to be sent to the Event Bus. This may not be null.
Returns:
the array of global instance IDs of the events that have been sent.
Throws:
com.ibm.events.EventsException - if an error ocurrs during event processing.
See Also:
Emitter.sendEvents(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[])

sendEvents

public java.lang.String[] sendEvents(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] cbes,
                                     int synchMode,
                                     int txMode)
                              throws com.ibm.events.EventsException
Deprecated. 
Sends an array of events to the Event Bus overriding the default emitter behavior with the passed parameters. The event will only be sent to the bus if:

Specified by:
sendEvents in interface com.ibm.events.emitter.Emitter
Parameters:
cbes - the array of events to be sent to the Event Bus. This may not be null.
synchMode - indicates whether the event will be sent synchronously (SynchronizationMode.SYNCHRONOUS) or asynchronously (SynchronizationMode.ASYNCHRONOUS) If synchronous, this call will not return until the event has been processed by the event server. If asynchronous, this call will return as soon as the event emitter has passed the event to the server. To avoid overriding the synchronization mode, pass a value of SynchronizationMode.DEFAULT.
txMode - indicates whether the event emitter should process the event in the current transaction (TransactionMode.SAME) or not (TransactionMode.NEW). To avoid overriding the transaction mode, pass a value of TransactionMode.DEFAULT.
Returns:
an array of global instance IDs of the events that were sent.
Throws:
com.ibm.events.EventsException - if an error ocurrs during event processing.
See Also:
Emitter.sendEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent, int, int)

setTransactionMode

public void setTransactionMode(int arg0)
                        throws com.ibm.events.emitter.TransactionModeNotSupportedException
Deprecated. 
Sets the transaction mode to use when sending events to the Event Bus.

Specified by:
setTransactionMode in interface com.ibm.events.emitter.Emitter
Parameters:
arg0 - The transaction mode to use. Valid values are:
  • TransactionMode.SAME to use the same transaction as the client.
  • TransactionMode.NEW for a new transaction.
  • TransactionMode.DEFAULT to use the default setting in the emitter.
Throws:
com.ibm.events.emitter.TransactionModeNotSupportedException - if an error occurred in switching the transaction mode.
See Also:
Emitter.setTransactionMode(int)

getTransactionMode

public int getTransactionMode()
Deprecated. 
Allows the caller to determine the currently active transaction mode.

Specified by:
getTransactionMode in interface com.ibm.events.emitter.Emitter
Returns:
either TransactionMode.SAME or TransactionMode.NEW.
See Also:
Emitter.getTransactionMode()

getSynchronizationMode

public int getSynchronizationMode()
Deprecated. 
Allows the caller to determine the current setting for synchronization in this emitter.

Specified by:
getSynchronizationMode in interface com.ibm.events.emitter.Emitter
Returns:
a synchronization mode represented by an int value.
See Also:
Emitter.getSynchronizationMode()

setSynchronizationMode

public void setSynchronizationMode(int arg0)
                            throws com.ibm.events.emitter.EmitterException
Deprecated. 
Sets the default synchronization mode to use when sending events to the Event Bus.

Specified by:
setSynchronizationMode in interface com.ibm.events.emitter.Emitter
Parameters:
arg0 - The synchronization mode to use when sending events to the Event Bus. Valid values are:
  • SynchronizationMode.SYNCHRONOUS to send events to the bus synchronously.
  • SynchronizationMode.ASYNCHRONOUS to send events to the bus asynchronously.
  • SynchronizationMode.DEFAULT to use the default setting in the emitter.
Throws:
com.ibm.events.emitter.EmitterException - if an error occurred in switching the synchronization mode.
See Also:
Emitter.setSynchronizationMode(int)

getMetaData

public com.ibm.events.ComponentMetaData getMetaData()
Deprecated. 
Used to obtain the emitter component meta data.

Specified by:
getMetaData in interface com.ibm.events.emitter.Emitter
Returns:
the component meta data for the emitter.
See Also:
Emitter.getMetaData()

getFilterMetaData

public com.ibm.events.ComponentMetaData getFilterMetaData()
                                                   throws com.ibm.events.filter.FilterException
Deprecated. 
Used to obtain the filter meta data. Returns null if no filter is configured for this emitter. If a filter is defined then this method returns the result of a Filter.getMetaData() call.

Specified by:
getFilterMetaData in interface com.ibm.events.emitter.Emitter
Returns:
component meta data for the filter, or null if not available.
Throws:
com.ibm.events.filter.FilterException - if an error occurred in the filter while obtaining meta data.
See Also:
Emitter.getFilterMetaData()

close

public void close()
           throws com.ibm.events.EventsException
Deprecated. 
Instructs the emitter to release all resources that are owned by this object and dependents.

Specified by:
close in interface com.ibm.events.emitter.Emitter
Throws:
com.ibm.events.EventsException - if any other error occurs releasing resources.
See Also:
Emitter.close()

isSynchronizationModeSupported

public boolean isSynchronizationModeSupported(int arg0)
Deprecated. 
Allows the caller to determine if a synchronization mode is supported by this emitter.

Specified by:
isSynchronizationModeSupported in interface com.ibm.events.emitter.Emitter
Parameters:
arg0 - the SynchronizationMode to be tested for support.
Returns:
true if the passed synchronization mode is supoprted, false otherwise.
See Also:
Emitter.isSynchronizationModeSupported(int)

getCurrentEcsID

public java.lang.String getCurrentEcsID()
Deprecated. 
Gets the current ECS ID locally stored on the ECSEmitter instance.

Returns:
The current value of the ECS ID.

setTempCurrentEcsID

public void setTempCurrentEcsID(java.lang.String newCurEcsID)
Deprecated. 
Overrides the content of the current ECS id that is set in the emitted CBEs. The context in the correlation sphere is not affected.

Parameters:
newCurEcsID - The new ECS ID to be set as the current ECS ID.

getParentEcsID

public java.lang.String getParentEcsID()
Deprecated. 
Gets the parent ECS ID locally stored on the ECSEmitter instance.

Returns:
The parent value of the current ECS ID.

setTempParentEcsID

public void setTempParentEcsID(java.lang.String newParEcsID)
Deprecated. 
Overrides the value of the parent ECS id that is set in the emitted CBEs. The context in the correlation sphere is not affected.

Parameters:
newParEcsID - The new ECS ID to be set as the parent ECS ID.

releaseAndEndECS

public void releaseAndEndECS(java.lang.String ecsID)
Deprecated. 
Releases the current ECSEmitter. It ends the event correlation sphere represented by the ecsID and deletes this ecsID from the stack on the workarea.

Parameters:
ecsID - The ecsID representing the key of the event correlation sphere that should be released.

addUserDataEvent

public void addUserDataEvent(java.util.Properties properties)
Deprecated. 
Creates and sends a user data event. A common base event is created by calling the CEI event factory with event name "WebSphereProcessChoreographerUserDataEventBPEL". The properties are added to the event as extended data elements, the situation is set (ReportSituation) and the event is sent to CEI.

Parameters:
properties - The properties to be added to the event as extended data elements.

createCommonBaseEvent

public org.eclipse.hyades.logging.events.cbe.CommonBaseEvent createCommonBaseEvent(java.lang.String eventName)
Deprecated. 
Creates an common base event via eventFactory

Parameters:
eventName - an event name to be set
Returns:
a CommonBaseEvent
See Also:
EventFactory

hasNoCorrelationData

public boolean hasNoCorrelationData()
Deprecated. 

IBM WebSphere Application ServerTM
Release 7