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
Constructors Constructor Description DerivedKey(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAlgorithm()Gets the value of the algorithm property.BigIntegergetGeneration()Gets the value of the generation property.StringgetId()Gets the value of the id property.StringgetLabel()Gets the value of the label property.BigIntegergetLength()Gets the value of the length property.StringgetLocalPart()Gets the local name of this header element.StringgetNamespaceURI()byte[]getNonce()Gets the value of the nonce property.BigIntegergetOffset()Gets the value of the offset property.SecurityTokenReferenceTypegetSecurityTokenReference()Gets the value of the securityTokenReference property.XMLStreamReaderreadHeader()Reads the header as aXMLStreamReader.booleanrefersToSecHdrWithId(String id)checks 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.voidsetId(String value)Sets the value of the id property.voidsetLabel(String value)Sets 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.voidsetSecurityTokenReference(SecurityTokenReferenceType value)Sets 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 Detail
-
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 Detail
-
getAlgorithm
public String getAlgorithm()
Description copied from interface:DerivedKeyTokenGets the value of the algorithm property.- Specified by:
getAlgorithmin interfaceDerivedKeyToken- Returns:
- possible object is
String
-
getGeneration
public BigInteger getGeneration()
Description copied from interface:DerivedKeyTokenGets the value of the generation property.- Specified by:
getGenerationin interfaceDerivedKeyToken- Returns:
- possible object is
BigInteger
-
getId
public String 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
public String getLabel()
Description copied from interface:DerivedKeyTokenGets the value of the label property.- Specified by:
getLabelin interfaceDerivedKeyToken- Returns:
- possible object is
String
-
getLength
public BigInteger 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
public BigInteger getOffset()
Description copied from interface:DerivedKeyTokenGets the value of the offset property.- Specified by:
getOffsetin interfaceDerivedKeyToken- Returns:
- possible object is
BigInteger
-
getSecurityTokenReference
public SecurityTokenReferenceType getSecurityTokenReference()
Description copied from interface:DerivedKeyTokenGets the value of the securityTokenReference property.- Specified by:
getSecurityTokenReferencein interfaceDerivedKeyToken- Returns:
- possible object is
SecurityTokenReferenceType
-
setAlgorithm
public void setAlgorithm(String value)
Description copied from interface:DerivedKeyTokenSets the value of the algorithm property.- Specified by:
setAlgorithmin interfaceDerivedKeyToken- Parameters:
value- allowed object isString
-
setGeneration
public void setGeneration(BigInteger value)
Description copied from interface:DerivedKeyTokenSets the value of the generation property.- Specified by:
setGenerationin interfaceDerivedKeyToken- Parameters:
value- allowed object isBigInteger
-
setId
public void setId(String value)
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
public void setLabel(String value)
Description copied from interface:DerivedKeyTokenSets the value of the label property.- Specified by:
setLabelin interfaceDerivedKeyToken- Parameters:
value- allowed object isString
-
setLength
public void setLength(BigInteger value)
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
public void setOffset(BigInteger value)
Description copied from interface:DerivedKeyTokenSets the value of the offset property.- Specified by:
setOffsetin interfaceDerivedKeyToken- Parameters:
value- allowed object isBigInteger
-
setSecurityTokenReference
public void setSecurityTokenReference(SecurityTokenReferenceType value)
Description copied from interface:DerivedKeyTokenSets the value of the securityTokenReference property.- Specified by:
setSecurityTokenReferencein interfaceDerivedKeyToken- Parameters:
value- allowed object isSecurityTokenReferenceType
-
getNamespaceURI
public String getNamespaceURI()
- Specified by:
getNamespaceURIin interfaceSecurityElement- Returns:
- namespace uri of the security header element.
-
getLocalPart
public String getLocalPart()
Description copied from interface:SecurityElementGets the local name of this header element.- Specified by:
getLocalPartin interfaceSecurityElement- Returns:
- this string must be interned.
-
readHeader
public XMLStreamReader readHeader() throws XMLStreamException
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.
- Throws:
XMLStreamException
-
writeTo
public void writeTo(OutputStream os)
creates and writes the derived key token to the output stream- Specified by:
writeToin interfaceSecurityElementWriter- Parameters:
os- OutputStream
-
writeTo
public void writeTo(XMLStreamWriter streamWriter) throws XMLStreamException
creates and writes the derived key token to the XMLStreamWriter- Specified by:
writeToin interfaceSecurityElementWriter- Parameters:
streamWriter-- Throws:
XMLStreamException
-
refersToSecHdrWithId
public boolean refersToSecHdrWithId(String id)
checks whether this object refers to the object with the given id- Specified by:
refersToSecHdrWithIdin interfaceSecurityHeaderElement- Parameters:
id- String- Returns:
- boolean
-
writeTo
public void writeTo(XMLStreamWriter streamWriter, HashMap props) throws XMLStreamException
writes the derived key to the XMLStreamWriter- Specified by:
writeToin interfaceSecurityElementWriter- Parameters:
streamWriter-props-- Throws:
XMLStreamException
-
-