cgl.narada.service.reliable
Interface ReliableDeliveryService


public interface ReliableDeliveryService

This class provides a set of core functions that service implementations need to satisfy. All services within the system need to conform to this interface. This class pertains to the reliable delivery service being provided to entities within the system. The service is responsible for among other things (a) Maintain the list of registered entities (b) Load the appropriate matching engines, depending upon the type of templates being managed. (c) Store events received onto stable storage. (d) Manage invoice events and ensure efficient negotiations with publishing entities.


Method Summary
 void addProfile(int templateId, Profile profile)
          Add a profile
 void addTemplateManagement(TemplateInfo templateInfo)
          Add template management
 TemplateInfo createTemplateInfo(int templateId, int templateType, Object template)
          Create a templateInfo
 void deRegisterEntity(int entityId)
          Removes an entity from the list of registered entities.
 void deregisterEntityFromTemplate(int entityId, int templateId)
          Deregister's an entity from a managed template
 CompanionDbInfo getCompanionDbInfo(int templateId)
           
 TemplateInfo[] getListOfManagedTemplates()
          Returns a array containing the list of managed templates
 void processAckInvoiceEvent(RdAckInvoiceEntityEvent ackInvoiceEvent)
          Processes an ACK invoice event received from an entity
 void processCompanionEvent(RdCompanionEntityEvent companionEvent)
          Processes a companion event received for a previously published event
 void processEntityRecoveryRequest(RdRecoveryEntityRequest recoveryRequest)
           
 void processNakInvoiceEvent(RdNakInvoiceEntityEvent nakInvoiceEvent)
          Processes an nak invoice event received from an entity
 void processProfileUpdateRequest(RdProfileUpdateRequest profileUpdateRequest)
          Process a profile update request
 void processPublishedEvent(NBEvent nbEvent)
          Processes a published event received from an entity
 void processRepublishedEvent(RdRepublishedEntityEvent republishedEvent)
           
 void recoverFromFailure()
          This method is invoked the first time a stable storage starts up, which might be after a failure or after a prolonged shutdown.
 void registerEntity(int entityId)
           
 void registerEntityForTemplate(int entityId, int templateId)
          Registers an entity with a managed template.
 void removeProfile(int templateId, Profile profile)
           
 void removeTemplateManagement(int templateId)
          Remove template management
 void storeEventToStorage(NBEvent nbEvent)
          Proceed to store an event onto Storage
 

Method Detail

registerEntity

void registerEntity(int entityId)
                    throws ServiceException
Throws:
ServiceException

deRegisterEntity

void deRegisterEntity(int entityId)
                      throws ServiceException
Removes an entity from the list of registered entities. Also for every template id cycle through the entity list and remove the entity if present

Throws:
ServiceException

createTemplateInfo

TemplateInfo createTemplateInfo(int templateId,
                                int templateType,
                                Object template)
                                throws ServiceException
Create a templateInfo

Throws:
ServiceException

addTemplateManagement

void addTemplateManagement(TemplateInfo templateInfo)
                           throws ServiceException
Add template management

Throws:
ServiceException

removeTemplateManagement

void removeTemplateManagement(int templateId)
                              throws ServiceException
Remove template management

Throws:
ServiceException

getListOfManagedTemplates

TemplateInfo[] getListOfManagedTemplates()
Returns a array containing the list of managed templates


registerEntityForTemplate

void registerEntityForTemplate(int entityId,
                               int templateId)
                               throws ServiceException
Registers an entity with a managed template.

Throws:
ServiceException

deregisterEntityFromTemplate

void deregisterEntityFromTemplate(int entityId,
                                  int templateId)
                                  throws ServiceException
Deregister's an entity from a managed template

Throws:
ServiceException

processProfileUpdateRequest

void processProfileUpdateRequest(RdProfileUpdateRequest profileUpdateRequest)
                                 throws ServiceException
Process a profile update request

Throws:
ServiceException

addProfile

void addProfile(int templateId,
                Profile profile)
                throws ServiceException
Add a profile

Throws:
ServiceException

removeProfile

void removeProfile(int templateId,
                   Profile profile)
                   throws ServiceException
Throws:
ServiceException

processAckInvoiceEvent

void processAckInvoiceEvent(RdAckInvoiceEntityEvent ackInvoiceEvent)
                            throws ServiceException
Processes an ACK invoice event received from an entity

Throws:
ServiceException

processNakInvoiceEvent

void processNakInvoiceEvent(RdNakInvoiceEntityEvent nakInvoiceEvent)
                            throws ServiceException
Processes an nak invoice event received from an entity

Throws:
ServiceException

processPublishedEvent

void processPublishedEvent(NBEvent nbEvent)
Processes a published event received from an entity


processCompanionEvent

void processCompanionEvent(RdCompanionEntityEvent companionEvent)
Processes a companion event received for a previously published event


processRepublishedEvent

void processRepublishedEvent(RdRepublishedEntityEvent republishedEvent)

processEntityRecoveryRequest

void processEntityRecoveryRequest(RdRecoveryEntityRequest recoveryRequest)

storeEventToStorage

void storeEventToStorage(NBEvent nbEvent)
                         throws ServiceException
Proceed to store an event onto Storage

Throws:
ServiceException

recoverFromFailure

void recoverFromFailure()
                        throws ServiceException
This method is invoked the first time a stable storage starts up, which might be after a failure or after a prolonged shutdown. This method enables the storage to recover from failures etc.

Throws:
ServiceException

getCompanionDbInfo

CompanionDbInfo getCompanionDbInfo(int templateId)


For comments and suggestions please send e-mail to The NaradaBrokering Project
For comments and suggestions please send e-mail to The NaradaBrokering Project