public interface Subscriber extends EventListener
Modifier and Type | Field and Description |
---|---|
static int |
TXCONTEXT_AFTER_COMMIT
Events notifications are performed within the publisher calling thread and only after
the current transaction completes successfully.
|
static int |
TXCONTEXT_BEFORE_COMMIT
Events notifications are performed within the publisher calling thread and
just before the current transaction is going to be committed.
|
static int |
TXCONTEXT_DEFAULT
Event notifications are performed when requested within the publisher calling thread and transaction.
|
static int |
TXCONTEXT_NEW_THREAD
Same conditions than AFTER_COMMIT but in addition a new thread separated from
the publisher calling thread is created.
|
Modifier and Type | Method and Description |
---|---|
int |
getTransactionContext()
Specify the transaction context in which event notifications must be sent to this subscriber.
|
void |
notifyEvent(int eventId,
Object eventInfo)
An event is notified by the Publisher to this Subscriber.
|
static final int TXCONTEXT_DEFAULT
static final int TXCONTEXT_BEFORE_COMMIT
static final int TXCONTEXT_AFTER_COMMIT
static final int TXCONTEXT_NEW_THREAD
int getTransactionContext()
TXCONTEXT_
constants available.void notifyEvent(int eventId, Object eventInfo)
eventId
- The id. of the event.eventInfo
- The event related information object.Copyright © 2012–2017 JBoss by Red Hat. All rights reserved.