cgl.narada.service.replay.impl
Class ReplayServiceImpl

java.lang.Object
  extended by cgl.narada.service.replay.ReplayService
      extended by cgl.narada.service.replay.impl.ReplayServiceImpl
All Implemented Interfaces:
NBEventListener, ServiceExceptionListener

public class ReplayServiceImpl
extends ReplayService
implements NBEventListener, ServiceExceptionListener

The Replay Service interface that is used by the consumers to play back events that were previously archived. Replays are initiated by ReplayRequests.


Method Summary
 void deregisterSubscriptionsForTemplate(int templateId)
          This method de-registers subscriptions for a template
static ReplayService getInstance()
           
 LinkedList getMaximumSequenceNumberAndTimestamp(int templateId)
           
 LinkedList getMinimumSequenceNumberAndTimestamp(int templateId)
           
 long getStoredEventTimestamp(long seqNumber)
           
 void initialize(int replayEntityId, StorageService storageService, Hashtable templatesAndEntities)
           
 boolean isInitialized()
           
 void onEvent(NBEvent nbEvent)
          Upon the receipt of an event which has satisfied all the constraints, if any were provided, that needed to be satisfied prior to delivery
 void onServiceException(ServiceException serviceException)
          end onEvent()
 void processReplayRequest(ReplayRequest replayRequest)
          Process a replay request
 void registerSubscriptionsForTemplate(int templateId)
          This method registers subscriptions for templates
 void setMaximumNumberOfPendingRequests(int maxPendingRequests)
          Set a limit on the maximum number of pending requests
 void setMaximumNumberOfProfilesInReplayRequest(int maxConstraints)
          Set the maximum number of profile constraints within a replay request
 void setMaximumNumberOfSequencesInReplay(int maxNumOfSequences)
          Set Maximum number of sequences in a replay
 void setSequenceRangeInReplayRequest(int maxSequenceRange)
          Set the upper bound for the maximum range in replay sequences
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

initialize

public void initialize(int replayEntityId,
                       StorageService storageService,
                       Hashtable templatesAndEntities)
                throws ServiceException
Specified by:
initialize in class ReplayService
Throws:
ServiceException

isInitialized

public boolean isInitialized()
Specified by:
isInitialized in class ReplayService

getInstance

public static ReplayService getInstance()

registerSubscriptionsForTemplate

public void registerSubscriptionsForTemplate(int templateId)
                                      throws ServiceException
This method registers subscriptions for templates

Specified by:
registerSubscriptionsForTemplate in class ReplayService
Throws:
ServiceException

deregisterSubscriptionsForTemplate

public void deregisterSubscriptionsForTemplate(int templateId)
                                        throws ServiceException
This method de-registers subscriptions for a template

Specified by:
deregisterSubscriptionsForTemplate in class ReplayService
Throws:
ServiceException

processReplayRequest

public void processReplayRequest(ReplayRequest replayRequest)
Process a replay request

Specified by:
processReplayRequest in class ReplayService

setSequenceRangeInReplayRequest

public void setSequenceRangeInReplayRequest(int maxSequenceRange)
Set the upper bound for the maximum range in replay sequences

Specified by:
setSequenceRangeInReplayRequest in class ReplayService

setMaximumNumberOfProfilesInReplayRequest

public void setMaximumNumberOfProfilesInReplayRequest(int maxConstraints)
Set the maximum number of profile constraints within a replay request

Specified by:
setMaximumNumberOfProfilesInReplayRequest in class ReplayService

setMaximumNumberOfSequencesInReplay

public void setMaximumNumberOfSequencesInReplay(int maxNumOfSequences)
Set Maximum number of sequences in a replay

Specified by:
setMaximumNumberOfSequencesInReplay in class ReplayService

setMaximumNumberOfPendingRequests

public void setMaximumNumberOfPendingRequests(int maxPendingRequests)
Set a limit on the maximum number of pending requests

Specified by:
setMaximumNumberOfPendingRequests in class ReplayService

getStoredEventTimestamp

public long getStoredEventTimestamp(long seqNumber)

getMinimumSequenceNumberAndTimestamp

public LinkedList getMinimumSequenceNumberAndTimestamp(int templateId)

getMaximumSequenceNumberAndTimestamp

public LinkedList getMaximumSequenceNumberAndTimestamp(int templateId)

onEvent

public void onEvent(NBEvent nbEvent)
Description copied from interface: NBEventListener
Upon the receipt of an event which has satisfied all the constraints, if any were provided, that needed to be satisfied prior to delivery

Specified by:
onEvent in interface NBEventListener

onServiceException

public void onServiceException(ServiceException serviceException)
end onEvent()

Specified by:
onServiceException in interface ServiceExceptionListener


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