cgl.narada.service.client.impl
Class ClientServiceImpl

java.lang.Object
  extended by cgl.narada.service.client.impl.ClientServiceImpl
All Implemented Interfaces:
ClientService

public class ClientServiceImpl
extends Object
implements ClientService

This class provides a set of core functions that are utilized by applications


Constructor Summary
ClientServiceImpl(int entityId, QosServiceImpl qosServiceImpl)
           
 
Method Summary
 void closeBrokerConnection()
          Signoff.
 EventConsumer createEventConsumer(NBEventListener listener)
           
 EventConsumer createEventConsumer(NBEventListener listener, NBNotificationListener notificationListener)
           
 EventProducer createEventProducer()
          Create an event producer
 EventProducer createEventProducer(NBNotificationListener notificationListener)
          Create an event producer with the specified NotificationListener
 Profile createProfile(int type, Object subscription)
          Creates a profile
 Profile createProfile(int type, String profileId, Object subscription)
          Creates a profile
 ReplayRequest createReplayRequest(int templateId, long[] sequencesToReplay)
          Create a repleay request based on the sequences that need to be replayed
 ReplayRequest createReplayRequest(int templateId, long sequenceStart, long sequenceEnd)
          Create a replay request based on the specified range
 ReplayRequest createReplayRequest(int templateId, long sequenceStart, long sequenceEnd, Profile[] specifiedConstraints)
          Create a replay request based on the specified constraints
 TemplateInfo createTemplateInfo(int templateId, int templateType, Object template)
          Creates a template info
 TemplateInfo createTemplateInfo(int templateId, int templateType, Object template, Object allEncompassingConstraint)
          Creates a template info
 int getEntityId()
           
 QosServiceImpl getQosServiceImpl()
           
 boolean hasPendingTransfers()
           
 void initializeBrokerCommunications(Properties props, String commType)
           
 boolean isInitialized()
           
 void setCommunicationLossListener(ConnectionLossListener connLossListener)
           
 void terminateServices()
          Terminate services that are currently running within the JVM
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientServiceImpl

public ClientServiceImpl(int entityId,
                         QosServiceImpl qosServiceImpl)
Method Detail

getEntityId

public int getEntityId()
Specified by:
getEntityId in interface ClientService

isInitialized

public boolean isInitialized()
Specified by:
isInitialized in interface ClientService

initializeBrokerCommunications

public void initializeBrokerCommunications(Properties props,
                                           String commType)
                                    throws ServiceException
Specified by:
initializeBrokerCommunications in interface ClientService
Throws:
ServiceException

setCommunicationLossListener

public void setCommunicationLossListener(ConnectionLossListener connLossListener)
Specified by:
setCommunicationLossListener in interface ClientService

createProfile

public Profile createProfile(int type,
                             Object subscription)
                      throws ServiceException
Creates a profile

Specified by:
createProfile in interface ClientService
Throws:
ServiceException

createProfile

public Profile createProfile(int type,
                             String profileId,
                             Object subscription)
                      throws ServiceException
Creates a profile

Specified by:
createProfile in interface ClientService
Throws:
ServiceException

getQosServiceImpl

public QosServiceImpl getQosServiceImpl()
Specified by:
getQosServiceImpl in interface ClientService

createTemplateInfo

public TemplateInfo createTemplateInfo(int templateId,
                                       int templateType,
                                       Object template)
                                throws ServiceException
Creates a template info

Specified by:
createTemplateInfo in interface ClientService
Throws:
ServiceException

createTemplateInfo

public TemplateInfo createTemplateInfo(int templateId,
                                       int templateType,
                                       Object template,
                                       Object allEncompassingConstraint)
                                throws ServiceException
Creates a template info

Specified by:
createTemplateInfo in interface ClientService
Throws:
ServiceException

createEventConsumer

public EventConsumer createEventConsumer(NBEventListener listener)
                                  throws ServiceException
Specified by:
createEventConsumer in interface ClientService
Throws:
ServiceException

createEventConsumer

public EventConsumer createEventConsumer(NBEventListener listener,
                                         NBNotificationListener notificationListener)
                                  throws ServiceException
Specified by:
createEventConsumer in interface ClientService
Throws:
ServiceException

createEventProducer

public EventProducer createEventProducer()
                                  throws ServiceException
Description copied from interface: ClientService
Create an event producer

Specified by:
createEventProducer in interface ClientService
Throws:
ServiceException

createEventProducer

public EventProducer createEventProducer(NBNotificationListener notificationListener)
                                  throws ServiceException
Description copied from interface: ClientService
Create an event producer with the specified NotificationListener

Specified by:
createEventProducer in interface ClientService
Throws:
ServiceException

createReplayRequest

public ReplayRequest createReplayRequest(int templateId,
                                         long[] sequencesToReplay)
                                  throws ServiceException
Description copied from interface: ClientService
Create a repleay request based on the sequences that need to be replayed

Specified by:
createReplayRequest in interface ClientService
Throws:
ServiceException

createReplayRequest

public ReplayRequest createReplayRequest(int templateId,
                                         long sequenceStart,
                                         long sequenceEnd)
                                  throws ServiceException
Create a replay request based on the specified range

Specified by:
createReplayRequest in interface ClientService
Throws:
ServiceException

createReplayRequest

public ReplayRequest createReplayRequest(int templateId,
                                         long sequenceStart,
                                         long sequenceEnd,
                                         Profile[] specifiedConstraints)
                                  throws ServiceException
Create a replay request based on the specified constraints

Specified by:
createReplayRequest in interface ClientService
Throws:
ServiceException

closeBrokerConnection

public void closeBrokerConnection()
                           throws ServiceException
Signoff. All communications resources including the connection to the broker are released

Specified by:
closeBrokerConnection in interface ClientService
Throws:
ServiceException

terminateServices

public void terminateServices()
                       throws ServiceException
Terminate services that are currently running within the JVM

Specified by:
terminateServices in interface ClientService
Throws:
ServiceException

hasPendingTransfers

public boolean hasPendingTransfers()
                            throws ServiceException
Specified by:
hasPendingTransfers in interface ClientService
Throws:
ServiceException


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