|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface KeyAccessor
Returns the key selector and the optional KeyInfo instance for signing an XML
document. There is a default implementation DefaultKeySelector
.
The XML signature generator will first call getKeySelector(Message)
and then getKeyInfo(Message, Node, KeyInfoFactory)
.
Method Summary | |
---|---|
KeyInfo |
getKeyInfo(org.apache.camel.Message message,
Node messageBody,
KeyInfoFactory keyInfoFactory)
Returns the optional key info to be incorporated into the XML signature. |
KeySelector |
getKeySelector(org.apache.camel.Message message)
Returns the key selector which determines the key for signing the XML document. |
Method Detail |
---|
KeySelector getKeySelector(org.apache.camel.Message message) throws Exception
null
is returned the XML signature generator will throw a
XmlSignatureNoKeyException
.
message
- the incoming message, from which you can read headers to
configure the key selector, for example, a header could
contain a private key for the key selector
null
Exception
- if an error occursKeyInfo getKeyInfo(org.apache.camel.Message message, Node messageBody, KeyInfoFactory keyInfoFactory) throws Exception
null
is returned, no key info element is created. You can
create a key info instance via the key info factory.
message
- incoming message, from which you can read headers, for
example, there could be a header which contains the public key
or certificate for the key infomessageBody
- the message body as DOM node. If the message body is plain
text then the node will be a text node. If the message body is
a XML document, then the node is the root element.keyInfoFactory
- key info factory for creating the KeyInfo instance
null
Exception
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |