cgl.narada.service.qos.impl
Class QosEventImpl

java.lang.Object
  extended by cgl.narada.service.qos.impl.QosEventImpl
All Implemented Interfaces:
QosEvent

public class QosEventImpl
extends Object
implements QosEvent

An implementation of the the Qos Event.


Constructor Summary
QosEventImpl(NBEvent nbEvent)
           
QosEventImpl(NBEvent nbEvent, ProducerConstraints producerConstraints)
           
 
Method Summary
 void addConsumerConstraints(ConsumerConstraints _consumerConstraints)
          Add consumer constraints associated with this event.
 EventID getEventId()
          Returns the event id associated with the encapsulated event
 NBEvent getNBEvent()
          Returns the encapsulated event
 int getNumberofConsumerConstraints()
          Returns the number of pending consumer constraints
 ConsumerConstraints[] getPendingConsumerConstraints()
          Return pending consumer constraints
 ProducerConstraints getProducerConstraints()
          Return the producer constraints
 QosIdentifiers getQosIdentifiers()
          Indicates the current processing state of this event
 ConsumerConstraints getSatisfiedConsumerConstraints()
          If there are any consumer constraints that have been satisfied, based on the QosIdentifiers associated with this event -- that constraint will be returned.
 int getServiceToBeRoutedTo()
          This method returns the service which the event must be routed to for further processing.
 boolean hasConsumerConstraints()
          Indicates if there are any consumer constraints that were specified
 boolean hasMultipleConsumerConstraints()
          Indicates if the event had multiple consumer constraints that were specified
 boolean hasProducerConstraints()
          Indicates if there are any producer constraints that were specified
 boolean hasSatisfiedAllConstraints()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QosEventImpl

public QosEventImpl(NBEvent nbEvent)

QosEventImpl

public QosEventImpl(NBEvent nbEvent,
                    ProducerConstraints producerConstraints)
Method Detail

getEventId

public EventID getEventId()
Returns the event id associated with the encapsulated event

Specified by:
getEventId in interface QosEvent

getNBEvent

public NBEvent getNBEvent()
Returns the encapsulated event

Specified by:
getNBEvent in interface QosEvent

hasProducerConstraints

public boolean hasProducerConstraints()
Indicates if there are any producer constraints that were specified

Specified by:
hasProducerConstraints in interface QosEvent

getProducerConstraints

public ProducerConstraints getProducerConstraints()
Return the producer constraints

Specified by:
getProducerConstraints in interface QosEvent

getQosIdentifiers

public QosIdentifiers getQosIdentifiers()
Indicates the current processing state of this event

Specified by:
getQosIdentifiers in interface QosEvent

hasConsumerConstraints

public boolean hasConsumerConstraints()
Indicates if there are any consumer constraints that were specified

Specified by:
hasConsumerConstraints in interface QosEvent

getNumberofConsumerConstraints

public int getNumberofConsumerConstraints()
Returns the number of pending consumer constraints

Specified by:
getNumberofConsumerConstraints in interface QosEvent

hasMultipleConsumerConstraints

public boolean hasMultipleConsumerConstraints()
Indicates if the event had multiple consumer constraints that were specified

Specified by:
hasMultipleConsumerConstraints in interface QosEvent

addConsumerConstraints

public void addConsumerConstraints(ConsumerConstraints _consumerConstraints)
Add consumer constraints associated with this event. This method can be called repeatedly to add more than 1 registered consumer constraints from matching consumers.

Specified by:
addConsumerConstraints in interface QosEvent

hasSatisfiedAllConstraints

public boolean hasSatisfiedAllConstraints()

getSatisfiedConsumerConstraints

public ConsumerConstraints getSatisfiedConsumerConstraints()
If there are any consumer constraints that have been satisfied, based on the QosIdentifiers associated with this event -- that constraint will be returned.
The method will return a NULL under the following conditions (a) If no consumer constraints have been satisfied OR (b) If all constraints have been satisfied OR (c) If no consumer constraints were specified

Specified by:
getSatisfiedConsumerConstraints in interface QosEvent

getServiceToBeRoutedTo

public int getServiceToBeRoutedTo()
This method returns the service which the event must be routed to for further processing. If this returns 0, no further processing is required. A 0 indicates that no service was found for special processing, and that the event is ready to be released (either to the application or to the communications stream )

Specified by:
getServiceToBeRoutedTo in interface QosEvent

getPendingConsumerConstraints

public ConsumerConstraints[] getPendingConsumerConstraints()
Return pending consumer constraints

Specified by:
getPendingConsumerConstraints in interface QosEvent


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