cgl.narada.service.qos.impl
Class ProducerConstraintsImpl

java.lang.Object
  extended by cgl.narada.service.qos.impl.ProducerConstraintsImpl
All Implemented Interfaces:
ProducerConstraints

public class ProducerConstraintsImpl
extends Object
implements ProducerConstraints

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


Field Summary
 
Fields inherited from interface cgl.narada.service.qos.ProducerConstraints
CIPHER_MODE, CIPHER_PADDING, SIGNING_ALGORITHM
 
Constructor Summary
ProducerConstraintsImpl(int entityId, int producerId, TemplateInfo templateInfo)
           
 
Method Summary
 Properties getCompressionParams()
           
 Properties getEncryptionProperties()
           
 int getEntityId()
           
 Properties getFragmentationParams()
           
 int getProducerId()
           
 SecretKey getSecretKey()
           
 SignedSecurityToken getSignedSecurityToken()
           
 TemplateInfo getTemplateInfo()
           
 boolean hasSatisfiedSpecifiedConstraints(QosIdentifiers identifiers)
           
 boolean isSendAfterFragmentation()
           
 boolean isSendAfterPayloadCompression()
           
 boolean isSendReliably()
           
 boolean isSendSecurely()
           
 boolean isSendWithMessageDigest()
           
 void setSecurityToken(SignedSecurityToken sst, SecretKey key, PrivateKey privKey, Properties props)
          Sets the security token for publishing events over a secure topic
NOTE: This is a non-optional requirement for subscribing to secure topics
 void setSendAfterFragmentation(Properties fragmentationProperties)
           
 void setSendAfterPayloadCompression(Properties compressionProperties)
           
 void setSendReliably()
           
 void setSendSecurely()
           
 void setSendWithMessageDigest()
           
 byte[] signPayload(byte[] payload, String useAlgorithm)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProducerConstraintsImpl

public ProducerConstraintsImpl(int entityId,
                               int producerId,
                               TemplateInfo templateInfo)
Method Detail

getTemplateInfo

public TemplateInfo getTemplateInfo()
Specified by:
getTemplateInfo in interface ProducerConstraints

getProducerId

public int getProducerId()

getEntityId

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

setSendSecurely

public void setSendSecurely()
Specified by:
setSendSecurely in interface ProducerConstraints

setSendReliably

public void setSendReliably()
Specified by:
setSendReliably in interface ProducerConstraints

setSendWithMessageDigest

public void setSendWithMessageDigest()
Specified by:
setSendWithMessageDigest in interface ProducerConstraints

setSendAfterPayloadCompression

public void setSendAfterPayloadCompression(Properties compressionProperties)
Specified by:
setSendAfterPayloadCompression in interface ProducerConstraints

getCompressionParams

public Properties getCompressionParams()
Specified by:
getCompressionParams in interface ProducerConstraints

setSendAfterFragmentation

public void setSendAfterFragmentation(Properties fragmentationProperties)
Specified by:
setSendAfterFragmentation in interface ProducerConstraints

getFragmentationParams

public Properties getFragmentationParams()
Specified by:
getFragmentationParams in interface ProducerConstraints

isSendSecurely

public boolean isSendSecurely()
Specified by:
isSendSecurely in interface ProducerConstraints

isSendReliably

public boolean isSendReliably()
Specified by:
isSendReliably in interface ProducerConstraints

isSendWithMessageDigest

public boolean isSendWithMessageDigest()
Specified by:
isSendWithMessageDigest in interface ProducerConstraints

isSendAfterPayloadCompression

public boolean isSendAfterPayloadCompression()
Specified by:
isSendAfterPayloadCompression in interface ProducerConstraints

isSendAfterFragmentation

public boolean isSendAfterFragmentation()
Specified by:
isSendAfterFragmentation in interface ProducerConstraints

hasSatisfiedSpecifiedConstraints

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

setSecurityToken

public void setSecurityToken(SignedSecurityToken sst,
                             SecretKey key,
                             PrivateKey privKey,
                             Properties props)
                      throws ServiceException
Sets the security token for publishing events over a secure topic
NOTE: This is a non-optional requirement for subscribing to secure topics

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

getSignedSecurityToken

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

signPayload

public byte[] signPayload(byte[] payload,
                          String useAlgorithm)
Specified by:
signPayload in interface ProducerConstraints

getSecretKey

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

getEncryptionProperties

public Properties getEncryptionProperties()
Specified by:
getEncryptionProperties in interface ProducerConstraints


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