public class HttpRequestHashGenerator extends Object implements DigestGenerator
DigestGenerator
for the HTTP protocol type.Constructor and Description |
---|
HttpRequestHashGenerator() |
Modifier and Type | Method and Description |
---|---|
Collection |
getAttributesWithoutNS(org.apache.axiom.om.OMElement element)
Gets the collection of attributes which are none namespace declarations for an OMElement sorted according to the
expanded names of the attributes.
|
String |
getDigest(org.apache.axis2.context.MessageContext msgContext)
This method will be implemented to return the unique XML node identifier on the given XML node
|
byte[] |
getDigest(org.apache.axiom.om.OMAttribute attribute,
String digestAlgorithm)
This is an overloaded method for the digest generation for OMAttribute.
|
byte[] |
getDigest(org.apache.axiom.om.OMElement element,
String toAddress,
Map<String,String> headers,
String digestAlgorithm)
This is an overloaded method for the digest generation for OMElement.
|
byte[] |
getDigest(org.apache.axiom.om.OMNode node,
String digestAlgorithm)
This is an overloaded method for the digest generation for OMNode.
|
byte[] |
getDigest(org.apache.axiom.om.OMNode node,
String toAddress,
Map<String,String> headers,
String digestAlgorithm)
This is an overloaded method for the digest generation for OMNode and request.
|
byte[] |
getDigest(org.apache.axiom.om.OMProcessingInstruction pi,
String digestAlgorithm)
This method is an overloaded method for the digest generation for OMProcessingInstruction.
|
byte[] |
getDigest(org.apache.axiom.om.OMText text,
String digestAlgorithm)
This method is an overloaded method for the digest generation for OMText.
|
byte[] |
getDigest(String toAddress,
String digestAlgorithm)
For the digest generation using the to address.
|
byte[] |
getDigest(String key,
String value,
String digestAlgorithm) |
String |
getExpandedName(org.apache.axiom.om.OMAttribute attribute)
This is an overloaded method for getting the expanded name as namespaceURI followed by the local name for
OMAttribute.
|
String |
getExpandedName(org.apache.axiom.om.OMElement element)
This is an overloaded method for getting the expanded name as namespaceURI followed by the local name for
OMElement.
|
String |
getStringRepresentation(byte[] array)
Gets the String representation of the byte array.
|
void |
init(Map<String,Object> properties)
If more properties are needed to generate the hash other than the
MessageContext it can be initialized
via this method |
public String getDigest(org.apache.axis2.context.MessageContext msgContext) throws CachingException
getDigest
in interface DigestGenerator
msgContext
- - MessageContext on which the unique identifier will be generatedCachingException
- if there is an error in generating the digest keypublic byte[] getDigest(String toAddress, String digestAlgorithm) throws CachingException
toAddress
- Request To address to be subjected to the key generationdigestAlgorithm
- digest algorithm as a StringCachingException
- if there is an error in generating the digestpublic byte[] getDigest(org.apache.axiom.om.OMNode node, String digestAlgorithm) throws CachingException
node
- - OMNode to be subjected to the key generationdigestAlgorithm
- - digest algorithm as a StringCachingException
- if there is an error in generating the digestpublic byte[] getDigest(org.apache.axiom.om.OMNode node, String toAddress, Map<String,String> headers, String digestAlgorithm) throws CachingException
node
- - OMNode to be subjected to the key generationtoAddress
- - Request To address to be subjected to the key generationheaders
- - Header parameters to be subjected to the key generationdigestAlgorithm
- - digest algorithm as a StringCachingException
- if there is an error in generating the digestpublic byte[] getDigest(String key, String value, String digestAlgorithm) throws CachingException
CachingException
public String getStringRepresentation(byte[] array)
array
- - byte[] of which the String representation is requiredpublic byte[] getDigest(org.apache.axiom.om.OMElement element, String toAddress, Map<String,String> headers, String digestAlgorithm) throws CachingException
element
- - OMElement to be subjected to the key generationdigestAlgorithm
- - digest algorithm as a StringCachingException
- if there is an io error or the specified algorithm is incorrectpublic byte[] getDigest(org.apache.axiom.om.OMText text, String digestAlgorithm) throws CachingException
text
- - OMText to be subjected to the key generationdigestAlgorithm
- - digest algorithm as a StringCachingException
- if the specified algorithm is incorrect or the encoding is not supported by the
processorpublic byte[] getDigest(org.apache.axiom.om.OMProcessingInstruction pi, String digestAlgorithm) throws CachingException
pi
- - OMProcessingInstruction to be subjected to the key generationdigestAlgorithm
- - digest algorithm as a StringCachingException
- if the specified algorithm is incorrect or the encoding is not supported by the
processorpublic byte[] getDigest(org.apache.axiom.om.OMAttribute attribute, String digestAlgorithm) throws CachingException
attribute
- - OMAttribute to be subjected to the key generationdigestAlgorithm
- - digest algorithm as a StringCachingException
- if the specified algorithm is incorrect or the encoding is not supported by the
processorpublic String getExpandedName(org.apache.axiom.om.OMElement element)
element
- - OMElement of which the expanded name is retrievedpublic String getExpandedName(org.apache.axiom.om.OMAttribute attribute)
attribute
- - OMAttribute of which the expanded name is retrievedpublic Collection getAttributesWithoutNS(org.apache.axiom.om.OMElement element)
element
- - OMElement of which the none ns declaration attributes to be retrievedpublic void init(Map<String,Object> properties)
DigestGenerator
MessageContext
it can be initialized
via this methodinit
in interface DigestGenerator
properties
- A list of other properties used to generate the hashCopyright © 2017 WSO2. All rights reserved.