Dashboard Builder Commons 6.0.0.CR2

org.jboss.dashboard.commons.events
Interface Subscriber

All Superinterfaces:
EventListener

public interface Subscriber
extends EventListener

The subscriber party int the publish/subscribe GoF design pattern.


Field Summary
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.
 
Method Summary
 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.
 

Field Detail

TXCONTEXT_DEFAULT

static final int TXCONTEXT_DEFAULT
Event notifications are performed when requested within the publisher calling thread and transaction. Regardless the current transaction is completed or rolled back the notification is sent.

See Also:
Constant Field Values

TXCONTEXT_BEFORE_COMMIT

static final int TXCONTEXT_BEFORE_COMMIT
Events notifications are performed within the publisher calling thread and just before the current transaction is going to be committed. Calls to the persistence layer are executed within the current transaction.

See Also:
Constant Field Values

TXCONTEXT_AFTER_COMMIT

static final int TXCONTEXT_AFTER_COMMIT
Events notifications are performed within the publisher calling thread and only after the current transaction completes successfully. Calls to the persistence layer are executed in a different transaction.

See Also:
Constant Field Values

TXCONTEXT_NEW_THREAD

static final int TXCONTEXT_NEW_THREAD
Same conditions than AFTER_COMMIT but in addition a new thread separated from the publisher calling thread is created. Calls to the persistence layer are executed in a different transaction and thread.

See Also:
Constant Field Values
Method Detail

getTransactionContext

int getTransactionContext()
Specify the transaction context in which event notifications must be sent to this subscriber.

Returns:
See above the TXCONTEXT_ constants available.

notifyEvent

void notifyEvent(int eventId,
                 Object eventInfo)
An event is notified by the Publisher to this Subscriber.

Parameters:
eventId - The id. of the event.
eventInfo - The event related information object.

Dashboard Builder Commons 6.0.0.CR2

Copyright © 2012-2013 JBoss by Red Hat. All Rights Reserved.