|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.websphere.cem.ECSEmitter
Constructor Summary | |
---|---|
ECSEmitter(java.lang.String jndiName,
java.lang.String _ecsID)
ECSEmitter constructor. |
Method Summary | |
---|---|
void |
addUserDataEvent(java.util.Properties properties)
Creates and sends a user data event. |
void |
close()
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)
Creates an common base event via eventFactory |
protected javax.naming.Context |
getContext()
Gets a context for use with JNDI lookups. |
java.lang.String |
getCurrentEcsID()
Gets the current ECS ID locally stored on the ECSEmitter instance. |
protected org.eclipse.hyades.logging.events.cbe.EventFactory |
getEventFactory()
Gets an eventFactory via jndi lookup |
com.ibm.events.ComponentMetaData |
getFilterMetaData()
Used to obtain the filter meta data. |
com.ibm.events.ComponentMetaData |
getMetaData()
Used to obtain the emitter component meta data. |
java.lang.String |
getParentEcsID()
Gets the parent ECS ID locally stored on the ECSEmitter instance. |
int |
getSynchronizationMode()
Allows the caller to determine the current setting for synchronization in this emitter. |
int |
getTransactionMode()
Allows the caller to determine the currently active transaction mode. |
protected com.ibm.websphere.cem.WorkAreaHelper |
getWah()
Gets an instance of the WorkAreaHelper. |
boolean |
isSynchronizationModeSupported(int arg0)
Allows the caller to determine if a synchronization mode is supported by this emitter. |
boolean |
isWorkAreaEmpty()
Checks if the current WorkArea is empty or not. |
void |
releaseAndEndECS(java.lang.String ecsID)
Releases the current ECSEmitter. |
java.lang.String |
sendEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent arg0)
Sends an event to the Event Bus. |
java.lang.String |
sendEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent arg0,
int arg1,
int arg2)
Sends an event to the Event Bus overriding the default emitter behavior with the passed parameters. |
void |
setCurrentEcsID(java.lang.String newCurEcsID)
Sets the current ECS ID to be locally stored on the ECSEmitter instance. |
void |
setParentEcsID(java.lang.String newParEcsID)
Sets the parent ECS ID to be locally stored on the ECSEmitter instance. |
void |
setSynchronizationMode(int arg0)
Sets the default synchronization mode to use when sending events to the Event Bus. |
void |
setTransactionMode(int arg0)
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 |
public ECSEmitter(java.lang.String jndiName, java.lang.String _ecsID)
jndiName
- The jndi Name of the emitter factory_ecsID
- The new EcsID in case a new correlation sphere needs
to be opened, otherwise nullMethod Detail |
public java.lang.String sendEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent arg0) throws com.ibm.events.EventsException
sendEvent
in interface com.ibm.events.emitter.Emitter
arg0
- the event to be sent to the Event Bus. This may not be null.
com.ibm.events.EventsException
- if an error ocurrs during event processing.Emitter.sendEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent)
public java.lang.String sendEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent arg0, int arg1, int arg2) throws com.ibm.events.EventsException
sendEvent
in interface com.ibm.events.emitter.Emitter
arg0
- the event to be sent to the Event Bus. This may not be null.arg1
- 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.arg2
- 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.
com.ibm.events.EventsException
- if an error ocurrs during event processing.Emitter.sendEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent, int, int)
public void setTransactionMode(int arg0) throws com.ibm.events.emitter.TransactionModeNotSupportedException
setTransactionMode
in interface com.ibm.events.emitter.Emitter
arg0
- The transaction mode to use. Valid values are:
com.ibm.events.emitter.TransactionModeNotSupportedException
- if an error occurred in switching
the transaction mode.Emitter.setTransactionMode(int)
public int getTransactionMode()
getTransactionMode
in interface com.ibm.events.emitter.Emitter
Emitter.getTransactionMode()
public int getSynchronizationMode()
getSynchronizationMode
in interface com.ibm.events.emitter.Emitter
Emitter.getSynchronizationMode()
public void setSynchronizationMode(int arg0) throws com.ibm.events.emitter.EmitterException
setSynchronizationMode
in interface com.ibm.events.emitter.Emitter
arg0
- The synchronization mode to use when sending events to the Event Bus.
Valid values are:
com.ibm.events.emitter.EmitterException
- if an error occurred in switching the synchronization mode.Emitter.setSynchronizationMode(int)
public com.ibm.events.ComponentMetaData getMetaData()
getMetaData
in interface com.ibm.events.emitter.Emitter
Emitter.getMetaData()
public com.ibm.events.ComponentMetaData getFilterMetaData() throws com.ibm.events.filter.FilterException
getFilterMetaData
in interface com.ibm.events.emitter.Emitter
com.ibm.events.filter.FilterException
- if an error occurred in the filter while obtaining meta data.Emitter.getFilterMetaData()
public void close() throws com.ibm.events.EventsException
close
in interface com.ibm.events.emitter.Emitter
com.ibm.events.EventsException
- if any other error occurs releasing resources.Emitter.close()
public boolean isSynchronizationModeSupported(int arg0)
isSynchronizationModeSupported
in interface com.ibm.events.emitter.Emitter
arg0
- the SynchronizationMode to be tested for support.
Emitter.isSynchronizationModeSupported(int)
protected javax.naming.Context getContext()
public java.lang.String getCurrentEcsID()
public void setCurrentEcsID(java.lang.String newCurEcsID)
newCurEcsID
- The new ECS ID to be set as the current ECS ID.public java.lang.String getParentEcsID()
public boolean isWorkAreaEmpty()
public void setParentEcsID(java.lang.String newParEcsID)
newParEcsID
- The new ECS ID to be set as the parent ECS ID.public void releaseAndEndECS(java.lang.String ecsID)
public void addUserDataEvent(java.util.Properties properties)
properties
- The properties to be added to the event as extended data elements.protected com.ibm.websphere.cem.WorkAreaHelper getWah()
protected org.eclipse.hyades.logging.events.cbe.EventFactory getEventFactory()
org.ecplise.hyades.logging.events.cbe.EventFactory
public org.eclipse.hyades.logging.events.cbe.CommonBaseEvent createCommonBaseEvent(java.lang.String eventName)
eventName
- an event name to be set
EventFactory
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |