|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Emitter
This is the interface for the event emitter. Event sources use this interface
to send events to an event service. Emitter instances are created
by EmitterFactory
instances.
This interface uses the following security roles:
EmitterFactory
,
CommonBaseEvent
,
com.ibm.events.filter
Method Summary | |
---|---|
void |
close()
Causes the emitter to release all resources that are owned by this object and its dependents. |
ComponentMetaData |
getFilterMetaData()
Obtains the filter metadata. |
ComponentMetaData |
getMetaData()
Obtains the emitter component metadata. |
int |
getSynchronizationMode()
Returns the current setting for the synchronization mode. |
int |
getTransactionMode()
Returns the current setting for the transaction mode. |
boolean |
isSynchronizationModeSupported(int synchronizationMode)
Enables the caller to determine if a synchronization mode is supported by this emitter. |
java.lang.String |
sendEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent event)
Sends an event to the event service. |
java.lang.String |
sendEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent event,
int synchronizationMode,
int transactionMode)
Sends an event to the event service, overriding the default emitter settings with the passed parameters. |
java.lang.String[] |
sendEvents(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] events)
Sends an array of events to the event service. |
java.lang.String[] |
sendEvents(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] events,
int synchronizationMode,
int transactionMode)
Sends an array of events to the event service. |
void |
setSynchronizationMode(int synchronizationMode)
Sets the default synchronization mode for sending events to the event service. |
void |
setTransactionMode(int transactionMode)
Sets the transaction mode for sending events to the event service. |
Method Detail |
---|
java.lang.String sendEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent event) throws EventsException
Sends an event to the event service.
The event is sent to the event service under the following circumstances:
CommonBaseEvent.validate()
method.The eventCreator or the eventAdministrator security role is required for this method.
event
- The event to be sent to the event service.
This value cannot be null.
EmitterException
- If an error occurs during emitter processing.
com.ibm.events.filter.FilterException
- If an error occurs during filter processing.
java.lang.IllegalArgumentException
- If the event parameter is null.
EventsException
java.lang.String sendEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent event, int synchronizationMode, int transactionMode) throws EventsException
Sends an event to the event service, overriding the default emitter settings with the passed parameters.
The event is sent to the event service under the following circunstances:
CommonBaseEvent.validate()
method.The eventCreator or the eventAdministrator security role is required for this method.
event
- The event to be sent to the event service. This
value cannot be null.synchronizationMode
- Indicates whether the event will be sent synchronously
(SynchronizationMode.SYNCHRONOUS
) or
asynchronously
(SynchronizationMode.ASYNCHRONOUS
)
If the event is sent synchronously, this call does
not return until the event has been processed by the
event service. If the event is sent asynchronously, this call returns
as soon as the event
emitter has passed the event to the event service.
To avoid overriding the synchronization mode,
pass a value of SynchronizationMode.DEFAULT
.transactionMode
- Indicates whether the event emitter
processes the event in the current transaction
(TransactionMode.SAME
) or in a new transaction
(TransactionMode.NEW
).
To avoid overriding the transaction mode,
pass a value of TransactionMode.DEFAULT
.
SynchronizationModeNotSupportedException
- If the the emitter does not support
the synchronization mode specified by the caller.
TransactionModeNotSupportedException
- If the the emitter does not support
the transaction mode specified by the caller.
EmitterException
- If an ocurrs during emitter processing.
com.ibm.events.filter.FilterException
- If an error occurs during filter processing.
java.lang.IllegalArgumentException
- If the event parameter is null or the
transactionMode or synchronizationMode are invalid.
EventsException
TransactionMode
,
SynchronizationMode
java.lang.String[] sendEvents(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] events) throws EventsException
Sends an array of events to the event service.
The events are sent to the event service under the following circumstances:
CommonBaseEvent.validate()
method.The eventCreator or the eventAdministrator security role is required for this method.
events
- The event array to be sent to the event service.
This value cannot be null.
EmitterException
- If an error occurs during emitter processing.
com.ibm.events.filter.FilterException
- If an error occurs during filter processing.
java.lang.IllegalArgumentException
- If the events parameter is null.
EventsException
java.lang.String[] sendEvents(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] events, int synchronizationMode, int transactionMode) throws EventsException
Sends an array of events to the event service.
, overriding the default emitter settings with the passed parameters.The events are sent to the event service under the following circumstances:
CommonBaseEvent.validate()
method.The eventCreator or the eventAdministrator security role is required for this method.
events
- The event array to be sent to the event service. This
value cannot be null.synchronizationMode
- Indicates whether the event will be sent synchronously
(SynchronizationMode.SYNCHRONOUS
) or
asynchronously
(SynchronizationMode.ASYNCHRONOUS
)
If the event is sent synchronously, this call does
not return until the event has been processed by the
event service. If the event is sent asynchronously, this call returns
as soon as the event
emitter has passed the event to the event service.
To avoid overriding the synchronization mode,
pass a value of SynchronizationMode.DEFAULT
.transactionMode
- Indicates whether the event emitter
processes the event in the current transaction
(TransactionMode.SAME
) or in a new transaction
(TransactionMode.NEW
).
To avoid overriding the transaction mode,
pass a value of TransactionMode.DEFAULT
.
SynchronizationModeNotSupportedException
- If the the emitter does not support
the synchronization mode specified by the caller.
TransactionModeNotSupportedException
- If the the emitter does not support
the transaction mode specified by the caller.
EmitterException
- If an ocurrs during emitter processing.
com.ibm.events.filter.FilterException
- If an error occurs during filter processing.
java.lang.IllegalArgumentException
- If the events parameter is null or the
transactionMode or synchronizationMode are invalid.
EventsException
TransactionMode
,
SynchronizationMode
void setTransactionMode(int transactionMode) throws TransactionModeNotSupportedException
Sets the transaction mode for sending events to the event service.
transactionMode
- The transaction mode to use.
Valid values are:
TransactionMode.SAME
to use the same
transaction as the caller.TransactionMode.NEW
to use a new
transaction.TransactionMode.DEFAULT
to use the
default setting in the emitter.TransactionModeNotSupportedException
- If the
transaction mode specified is not supported by this emitter.int getTransactionMode()
TransactionMode.SAME
or
TransactionMode.NEW
.int getSynchronizationMode()
SynchronizationMode.SYNCHRONOUS
or SynchronizationMode.ASYNCHRONOUS
.SynchronizationMode
void setSynchronizationMode(int synchronizationMode) throws EmitterException
synchronizationMode
- The synchronization mode for
sending events to the event service. Valid values are:
SynchronizationMode.SYNCHRONOUS
to send
events to the event service synchronously.SynchronizationMode.ASYNCHRONOUS
to send
events to the event service asynchronously.SynchronizationMode.DEFAULT
to use the
default setting in the emitter for sending events.SynchronizationModeNotSupportedException
- If the synchronization
mode specified is not supported by this emitter.
EmitterException
- If an error occurred when changing the
synchronization mode.ComponentMetaData getMetaData()
ComponentMetaData getFilterMetaData() throws com.ibm.events.filter.FilterException
Filter.getMetaData()
call.
com.ibm.events.filter.FilterException
- If an error occurred in the filter while
obtaining metadata.void close() throws EventsException
EmitterException
- If the emitter fails to release the
held resources.
com.ibm.events.filter.FilterException
- If the filter fails to release the held
resources.
EventsException
- If any other error occurs when releasing resources.boolean isSynchronizationModeSupported(int synchronizationMode)
synchronizationMode
- The SynchronizationMode
to be tested for support.
true
if the passed synchronization mode is suported, false
otherwise.SynchronizationMode
|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |