Class DerivedKey
java.lang.Object
com.sun.xml.ws.security.opt.impl.keyinfo.DerivedKey
- All Implemented Interfaces:
DerivedKeyToken,SecurityElement,SecurityElementWriter,SecurityHeaderElement
public class DerivedKey
extends Object
implements DerivedKeyToken, SecurityHeaderElement, SecurityElementWriter
- Author:
- K.Venugopal@sun.com
-
Constructor Summary
ConstructorsConstructorDescriptionDerivedKey(DerivedKeyTokenType dkt, com.sun.xml.ws.api.SOAPVersion soapVersion, String spVersion) Creates a new instance of DerivedKeyDerivedKey(DerivedKeyTokenType dkt, com.sun.xml.ws.api.SOAPVersion soapVersion, String refId, String spVersion) DerivedKey(DerivedKeyTokenType dkt, com.sun.xml.ws.api.SOAPVersion soapVersion, String spVersion) DerivedKey(DerivedKeyTokenType dkt, com.sun.xml.ws.api.SOAPVersion soapVersion, String refId, String spVersion) -
Method Summary
Modifier and TypeMethodDescriptionGets the value of the algorithm property.Gets the value of the generation property.getId()Gets the value of the id property.getLabel()Gets the value of the label property.Gets the value of the length property.Gets the local name of this header element.byte[]getNonce()Gets the value of the nonce property.Gets the value of the offset property.Gets the value of the securityTokenReference property.Reads the header as aXMLStreamReader.booleanchecks whether this object refers to the object with the given idvoidsetAlgorithm(String value) Sets the value of the algorithm property.voidsetGeneration(BigInteger value) Sets the value of the generation property.voidSets the value of the id property.voidSets the value of the label property.voidsetLength(BigInteger value) Sets the value of the length property.voidsetNonce(byte[] value) Sets the value of the nonce property.voidsetOffset(BigInteger value) Sets the value of the offset property.voidSets the value of the securityTokenReference property.voidwriteTo(OutputStream os) creates and writes the derived key token to the output streamvoidwriteTo(XMLStreamWriter streamWriter) creates and writes the derived key token to the XMLStreamWritervoidwriteTo(XMLStreamWriter streamWriter, HashMap props) writes the derived key to the XMLStreamWriter
-
Constructor Details
-
DerivedKey
public DerivedKey(DerivedKeyTokenType dkt, com.sun.xml.ws.api.SOAPVersion soapVersion, String spVersion) Creates a new instance of DerivedKey -
DerivedKey
public DerivedKey(DerivedKeyTokenType dkt, com.sun.xml.ws.api.SOAPVersion soapVersion, String refId, String spVersion) -
DerivedKey
public DerivedKey(DerivedKeyTokenType dkt, com.sun.xml.ws.api.SOAPVersion soapVersion, String spVersion) -
DerivedKey
public DerivedKey(DerivedKeyTokenType dkt, com.sun.xml.ws.api.SOAPVersion soapVersion, String refId, String spVersion)
-
-
Method Details
-
getAlgorithm
Description copied from interface:DerivedKeyTokenGets the value of the algorithm property.- Specified by:
getAlgorithmin interfaceDerivedKeyToken- Returns:
- possible object is
String
-
getGeneration
Description copied from interface:DerivedKeyTokenGets the value of the generation property.- Specified by:
getGenerationin interfaceDerivedKeyToken- Returns:
- possible object is
BigInteger
-
getId
Description copied from interface:DerivedKeyTokenGets the value of the id property.- Specified by:
getIdin interfaceDerivedKeyToken- Specified by:
getIdin interfaceSecurityElement- Returns:
- possible object is
String
-
getLabel
Description copied from interface:DerivedKeyTokenGets the value of the label property.- Specified by:
getLabelin interfaceDerivedKeyToken- Returns:
- possible object is
String
-
getLength
Description copied from interface:DerivedKeyTokenGets the value of the length property.- Specified by:
getLengthin interfaceDerivedKeyToken- Returns:
- possible object is
BigInteger
-
getNonce
public byte[] getNonce()Description copied from interface:DerivedKeyTokenGets the value of the nonce property.- Specified by:
getNoncein interfaceDerivedKeyToken- Returns:
- possible object is byte[]
-
getOffset
Description copied from interface:DerivedKeyTokenGets the value of the offset property.- Specified by:
getOffsetin interfaceDerivedKeyToken- Returns:
- possible object is
BigInteger
-
getSecurityTokenReference
Description copied from interface:DerivedKeyTokenGets the value of the securityTokenReference property.- Specified by:
getSecurityTokenReferencein interfaceDerivedKeyToken- Returns:
- possible object is
SecurityTokenReferenceType
-
setAlgorithm
Description copied from interface:DerivedKeyTokenSets the value of the algorithm property.- Specified by:
setAlgorithmin interfaceDerivedKeyToken- Parameters:
value- allowed object isString
-
setGeneration
Description copied from interface:DerivedKeyTokenSets the value of the generation property.- Specified by:
setGenerationin interfaceDerivedKeyToken- Parameters:
value- allowed object isBigInteger
-
setId
Description copied from interface:DerivedKeyTokenSets the value of the id property.- Specified by:
setIdin interfaceDerivedKeyToken- Specified by:
setIdin interfaceSecurityElement- Parameters:
value- allowed object isString
-
setLabel
Description copied from interface:DerivedKeyTokenSets the value of the label property.- Specified by:
setLabelin interfaceDerivedKeyToken- Parameters:
value- allowed object isString
-
setLength
Description copied from interface:DerivedKeyTokenSets the value of the length property.- Specified by:
setLengthin interfaceDerivedKeyToken- Parameters:
value- allowed object isBigInteger
-
setNonce
public void setNonce(byte[] value) Description copied from interface:DerivedKeyTokenSets the value of the nonce property.- Specified by:
setNoncein interfaceDerivedKeyToken- Parameters:
value- allowed object is byte[]
-
setOffset
Description copied from interface:DerivedKeyTokenSets the value of the offset property.- Specified by:
setOffsetin interfaceDerivedKeyToken- Parameters:
value- allowed object isBigInteger
-
setSecurityTokenReference
Description copied from interface:DerivedKeyTokenSets the value of the securityTokenReference property.- Specified by:
setSecurityTokenReferencein interfaceDerivedKeyToken- Parameters:
value- allowed object isSecurityTokenReferenceType
-
getNamespaceURI
- Specified by:
getNamespaceURIin interfaceSecurityElement- Returns:
- namespace uri of the security header element.
-
getLocalPart
Description copied from interface:SecurityElementGets the local name of this header element.- Specified by:
getLocalPartin interfaceSecurityElement- Returns:
- this string must be interned.
-
readHeader
Description copied from interface:SecurityElementReads the header as aXMLStreamReader.The returned parser points at the start element of this header. (IOW,
XMLStreamReader.getEventType()would returnXMLStreamConstants.START_ELEMENT.Performance Expectation
For some Header implementations, this operation is a non-trivial operation. Therefore, use of this method is discouraged unless the caller is interested in reading the whole header.
Similarly, if the caller wants to use this method only to do the API conversion (such as simply firing SAX events from
XMLStreamReader), then the JAX-WS team requests that you talk to us.Messages that come from tranport usually provides a reasonably efficient implementation of this method.
- Specified by:
readHeaderin interfaceSecurityElement- Returns:
- must not null.
-
writeTo
creates and writes the derived key token to the output stream- Specified by:
writeToin interfaceSecurityElementWriter- Parameters:
os- OutputStream
-
writeTo
creates and writes the derived key token to the XMLStreamWriter- Specified by:
writeToin interfaceSecurityElementWriter- Throws:
XMLStreamException- if the operation fails for some reason. This leaves the writer to an undefined state.
-
refersToSecHdrWithId
checks whether this object refers to the object with the given id- Specified by:
refersToSecHdrWithIdin interfaceSecurityHeaderElement- Parameters:
id- String- Returns:
- boolean
-
writeTo
writes the derived key to the XMLStreamWriter- Specified by:
writeToin interfaceSecurityElementWriter- Throws:
XMLStreamException
-