ERCNSubscriber Class Reference

Collaboration diagram for ERCNSubscriber:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void onMessage (Message message)

Package Functions

 ERCNSubscriber (ERCNNotificationCoordinator coordinator)
void subscribe (TopicConnection connection)
synchronized void terminate ()
void unsubscribe ()

Static Package Functions

static ERCNSubscriberDelegate delegate ()
static void setDelegate (ERCNSubscriberDelegate delegate)

Private Member Functions

void _processDeletions (ERCNSnapshot ercnSnapshot)
void _processInsertions (ERCNSnapshot ercnSnapshot)
void _processUpdates (ERCNSnapshot ercnSnapshot)

Private Attributes

ERCNNotificationCoordinator _coordinator
TopicSession _topicSession
TopicSubscriber _topicSubscriber

Static Private Attributes

static ERCNSubscriberDelegate _delegate


Detailed Description

ERCNSubscriber handles change notifications from other application instances via JMS server, and applies the changes to the local EOF stack managed by the default EOObjectStoreCoordinator.

There must be exactly one instance of the ERCNSubscriber on the application. Its onChange method is called by JMS's own single thread which manages asynchronous receiving mechanism, and therefore, it runs concurrently with other worker threads and will not interfere request-response cycles.

Note that the subscriber will not receive notifications from itself, but from other application instances. This is accomplished by using option flag when create the JMS topic subscriber object.

The current implementation only supports updating operations, not inserting or deleting operations. You can register a delegate object to process those operations.


Constructor & Destructor Documentation

ERCNSubscriber ( ERCNNotificationCoordinator  coordinator  )  [package]


Member Function Documentation

void _processDeletions ( ERCNSnapshot  ercnSnapshot  )  [private]

void _processInsertions ( ERCNSnapshot  ercnSnapshot  )  [private]

void _processUpdates ( ERCNSnapshot  ercnSnapshot  )  [private]

static ERCNSubscriberDelegate delegate (  )  [static, package]

void onMessage ( Message  message  ) 

static void setDelegate ( ERCNSubscriberDelegate  delegate  )  [static, package]

void subscribe ( TopicConnection  connection  )  [package]

synchronized void terminate (  )  [package]

void unsubscribe (  )  [package]


Member Data Documentation

ERCNSubscriberDelegate _delegate [static, private]

TopicSession _topicSession [private]

TopicSubscriber _topicSubscriber [private]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:46 2012 for Project Wonder by  doxygen 1.5.8