cgl.narada.service.qos.impl
Class ConsumerConstraintsImpl

java.lang.Object
  extended by cgl.narada.service.qos.impl.ConsumerConstraintsImpl
All Implemented Interfaces:
ConsumerConstraints

public class ConsumerConstraintsImpl
extends Object
implements ConsumerConstraints

Allows a consumer to specify QosConstraints on the sending or receiving of events conforming to a given profile


Constructor Summary
ConsumerConstraintsImpl(int entityId, int consumerId, Profile profile, int constraintId)
           
 
Method Summary
 int getConstraintIdentifier()
           
 int getConsumerId()
           
 Properties getDecryptionProperties()
           
 int getEntityId()
           
 Profile getProfile()
           
 PublicKey getRootCAPublicKey()
           
 SecretKey getSecretKey()
           
 SignedSecurityToken getSignedSecurityToken()
           
 int getTemplateId()
          Returns the templateId associated with the consumer constraint.
 boolean hasSatisfiedSpecifiedConstraints(QosIdentifiers identifiers)
           
 boolean isNoDecryptionRequested()
           
 boolean isReceiveAfterCoalescingFragments()
           
 boolean isReceiveAfterPayloadDecompression()
           
 boolean isReceiveAfterTimeSpacing()
           
 boolean isReceiveInOrder()
           
 boolean isReceiveInTimeOrder()
           
 boolean isReceiveReliably()
           
 boolean isReceiveSecurely()
           
 void setReceiveAfterCoalescingFragments()
           
 void setReceiveAfterPayloadDecompression()
           
 void setReceiveAfterTimeSpacing()
          Ensures that events are spaced in time before they are released.
 void setReceiveInOrder(int ordTemplateId)
          Enable ordered delivery of events corresponding to this template.
 void setReceiveInTimeOrder()
          Ensures that events are ordered in time before they are released.
 void setReceiveReliably(int recTemplateId)
          Enable reliable delivery of events corresponding to this template This method will throw an exception if the templateId specified during any of the previous invocations of methods (with the templateId argument) is different from the one specified in this method
 void setReceiveSecurely(int secTemplateId)
          Enable secure delivery of events corresponding to this template.
 void setSecurityToken(SignedSecurityToken sst, SecretKey key, Properties props, boolean doNotDecryptPayloadBeforeDelivery, PublicKey rootCAPubKey)
          Sets the security token for recieving events over a secure topic
NOTE: This is a non-optional requirement for subscribing to secure topics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsumerConstraintsImpl

public ConsumerConstraintsImpl(int entityId,
                               int consumerId,
                               Profile profile,
                               int constraintId)
Method Detail

getEntityId

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

getConsumerId

public int getConsumerId()

getTemplateId

public int getTemplateId()
Returns the templateId associated with the consumer constraint. There can be only one consumer constraint associated with a given consumer. If the templateId has NOT BEEN SET by one of the setter method, this method WILL RETURN 0. Otherwise it will return the value of the templateId

Specified by:
getTemplateId in interface ConsumerConstraints

getProfile

public Profile getProfile()
Specified by:
getProfile in interface ConsumerConstraints

getConstraintIdentifier

public int getConstraintIdentifier()

setReceiveInOrder

public void setReceiveInOrder(int ordTemplateId)
                       throws ServiceException
Enable ordered delivery of events corresponding to this template. This method will throw an exception if the templateId specified during any of the previous invocations of methods (with the templateId argument) is different from the one specified in this method

Specified by:
setReceiveInOrder in interface ConsumerConstraints
Throws:
ServiceException

setReceiveInTimeOrder

public void setReceiveInTimeOrder()
Ensures that events are ordered in time before they are released. The events are buffered for a duration of time prior to the release.

Specified by:
setReceiveInTimeOrder in interface ConsumerConstraints

setReceiveAfterTimeSpacing

public void setReceiveAfterTimeSpacing()
Ensures that events are spaced in time before they are released. This feature is traditionally used during the replay of audio-video multimedia streams

Specified by:
setReceiveAfterTimeSpacing in interface ConsumerConstraints

setReceiveReliably

public void setReceiveReliably(int recTemplateId)
                        throws ServiceException
Enable reliable delivery of events corresponding to this template This method will throw an exception if the templateId specified during any of the previous invocations of methods (with the templateId argument) is different from the one specified in this method

Specified by:
setReceiveReliably in interface ConsumerConstraints
Throws:
ServiceException

setReceiveSecurely

public void setReceiveSecurely(int secTemplateId)
                        throws ServiceException
Enable secure delivery of events corresponding to this template. This method will throw an exception if the templateId specified during any of the previous invocations of methods (with the templateId argument) is different from the one specified in this method

Specified by:
setReceiveSecurely in interface ConsumerConstraints
Throws:
ServiceException

setReceiveAfterPayloadDecompression

public void setReceiveAfterPayloadDecompression()
Specified by:
setReceiveAfterPayloadDecompression in interface ConsumerConstraints

isReceiveInOrder

public boolean isReceiveInOrder()
Specified by:
isReceiveInOrder in interface ConsumerConstraints

isReceiveInTimeOrder

public boolean isReceiveInTimeOrder()
Specified by:
isReceiveInTimeOrder in interface ConsumerConstraints

isReceiveAfterTimeSpacing

public boolean isReceiveAfterTimeSpacing()
Specified by:
isReceiveAfterTimeSpacing in interface ConsumerConstraints

isReceiveReliably

public boolean isReceiveReliably()
Specified by:
isReceiveReliably in interface ConsumerConstraints

isReceiveSecurely

public boolean isReceiveSecurely()
Specified by:
isReceiveSecurely in interface ConsumerConstraints

isReceiveAfterPayloadDecompression

public boolean isReceiveAfterPayloadDecompression()
Specified by:
isReceiveAfterPayloadDecompression in interface ConsumerConstraints

isReceiveAfterCoalescingFragments

public boolean isReceiveAfterCoalescingFragments()
Specified by:
isReceiveAfterCoalescingFragments in interface ConsumerConstraints

setReceiveAfterCoalescingFragments

public void setReceiveAfterCoalescingFragments()
Specified by:
setReceiveAfterCoalescingFragments in interface ConsumerConstraints

hasSatisfiedSpecifiedConstraints

public boolean hasSatisfiedSpecifiedConstraints(QosIdentifiers identifiers)
Specified by:
hasSatisfiedSpecifiedConstraints in interface ConsumerConstraints

setSecurityToken

public void setSecurityToken(SignedSecurityToken sst,
                             SecretKey key,
                             Properties props,
                             boolean doNotDecryptPayloadBeforeDelivery,
                             PublicKey rootCAPubKey)
Sets the security token for recieving events over a secure topic
NOTE: This is a non-optional requirement for subscribing to secure topics

Specified by:
setSecurityToken in interface ConsumerConstraints
Parameters:
sst - - The signed security token as obtained from a KMC
key - - The secret key associated with the topic. This will be used to decrypt the payload

getSignedSecurityToken

public SignedSecurityToken getSignedSecurityToken()
Specified by:
getSignedSecurityToken in interface ConsumerConstraints

getSecretKey

public SecretKey getSecretKey()
Specified by:
getSecretKey in interface ConsumerConstraints

getDecryptionProperties

public Properties getDecryptionProperties()
Specified by:
getDecryptionProperties in interface ConsumerConstraints

isNoDecryptionRequested

public boolean isNoDecryptionRequested()
Specified by:
isNoDecryptionRequested in interface ConsumerConstraints

getRootCAPublicKey

public PublicKey getRootCAPublicKey()
Specified by:
getRootCAPublicKey in interface ConsumerConstraints


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