com.sun.xml.ws.security.opt.impl.keyinfo
Class DerivedKey

java.lang.Object
  extended by 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
DerivedKey(DerivedKeyTokenType dkt, SOAPVersion soapVersion, String spVersion)
          Creates a new instance of DerivedKey
DerivedKey(DerivedKeyTokenType dkt, SOAPVersion soapVersion, String spVersion)
           
DerivedKey(DerivedKeyTokenType dkt, SOAPVersion soapVersion, String refId, String spVersion)
           
DerivedKey(DerivedKeyTokenType dkt, SOAPVersion soapVersion, String refId, String spVersion)
           
 
Method Summary
 String getAlgorithm()
          Gets the value of the algorithm property.
 BigInteger getGeneration()
          Gets the value of the generation property.
 String getId()
          Gets the value of the id property.
 String getLabel()
          Gets the value of the label property.
 BigInteger getLength()
          Gets the value of the length property.
 String getLocalPart()
          Gets the local name of this header element.
 String getNamespaceURI()
           
 byte[] getNonce()
          Gets the value of the nonce property.
 BigInteger getOffset()
          Gets the value of the offset property.
 SecurityTokenReferenceType getSecurityTokenReference()
          Gets the value of the securityTokenReference property.
 XMLStreamReader readHeader()
          Reads the header as a XMLStreamReader.
 boolean refersToSecHdrWithId(String id)
          checks whether this object refers to the object with the given id
 void setAlgorithm(String value)
          Sets the value of the algorithm property.
 void setGeneration(BigInteger value)
          Sets the value of the generation property.
 void setId(String value)
          Sets the value of the id property.
 void setLabel(String value)
          Sets the value of the label property.
 void setLength(BigInteger value)
          Sets the value of the length property.
 void setNonce(byte[] value)
          Sets the value of the nonce property.
 void setOffset(BigInteger value)
          Sets the value of the offset property.
 void setSecurityTokenReference(SecurityTokenReferenceType value)
          Sets the value of the securityTokenReference property.
 void writeTo(OutputStream os)
          creates and writes the derived key token to the output stream
 void writeTo(XMLStreamWriter streamWriter)
          creates and writes the derived key token to the XMLStreamWriter
 void writeTo(XMLStreamWriter streamWriter, HashMap props)
          writes the derived key to the XMLStreamWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DerivedKey

public DerivedKey(DerivedKeyTokenType dkt,
                  SOAPVersion soapVersion,
                  String spVersion)
Creates a new instance of DerivedKey


DerivedKey

public DerivedKey(DerivedKeyTokenType dkt,
                  SOAPVersion soapVersion,
                  String refId,
                  String spVersion)

DerivedKey

public DerivedKey(DerivedKeyTokenType dkt,
                  SOAPVersion soapVersion,
                  String spVersion)

DerivedKey

public DerivedKey(DerivedKeyTokenType dkt,
                  SOAPVersion soapVersion,
                  String refId,
                  String spVersion)
Method Detail

getAlgorithm

public String getAlgorithm()
Description copied from interface: DerivedKeyToken
Gets the value of the algorithm property.

Specified by:
getAlgorithm in interface DerivedKeyToken
Returns:
possible object is String

getGeneration

public BigInteger getGeneration()
Description copied from interface: DerivedKeyToken
Gets the value of the generation property.

Specified by:
getGeneration in interface DerivedKeyToken
Returns:
possible object is BigInteger

getId

public String getId()
Description copied from interface: DerivedKeyToken
Gets the value of the id property.

Specified by:
getId in interface DerivedKeyToken
Specified by:
getId in interface SecurityElement
Returns:
possible object is String

getLabel

public String getLabel()
Description copied from interface: DerivedKeyToken
Gets the value of the label property.

Specified by:
getLabel in interface DerivedKeyToken
Returns:
possible object is String

getLength

public BigInteger getLength()
Description copied from interface: DerivedKeyToken
Gets the value of the length property.

Specified by:
getLength in interface DerivedKeyToken
Returns:
possible object is BigInteger

getNonce

public byte[] getNonce()
Description copied from interface: DerivedKeyToken
Gets the value of the nonce property.

Specified by:
getNonce in interface DerivedKeyToken
Returns:
possible object is byte[]

getOffset

public BigInteger getOffset()
Description copied from interface: DerivedKeyToken
Gets the value of the offset property.

Specified by:
getOffset in interface DerivedKeyToken
Returns:
possible object is BigInteger

getSecurityTokenReference

public SecurityTokenReferenceType getSecurityTokenReference()
Description copied from interface: DerivedKeyToken
Gets the value of the securityTokenReference property.

Specified by:
getSecurityTokenReference in interface DerivedKeyToken
Returns:
possible object is SecurityTokenReferenceType

setAlgorithm

public void setAlgorithm(String value)
Description copied from interface: DerivedKeyToken
Sets the value of the algorithm property.

Specified by:
setAlgorithm in interface DerivedKeyToken
Parameters:
value - allowed object is String

setGeneration

public void setGeneration(BigInteger value)
Description copied from interface: DerivedKeyToken
Sets the value of the generation property.

Specified by:
setGeneration in interface DerivedKeyToken
Parameters:
value - allowed object is BigInteger

setId

public void setId(String value)
Description copied from interface: DerivedKeyToken
Sets the value of the id property.

Specified by:
setId in interface DerivedKeyToken
Specified by:
setId in interface SecurityElement
Parameters:
value - allowed object is String

setLabel

public void setLabel(String value)
Description copied from interface: DerivedKeyToken
Sets the value of the label property.

Specified by:
setLabel in interface DerivedKeyToken
Parameters:
value - allowed object is String

setLength

public void setLength(BigInteger value)
Description copied from interface: DerivedKeyToken
Sets the value of the length property.

Specified by:
setLength in interface DerivedKeyToken
Parameters:
value - allowed object is BigInteger

setNonce

public void setNonce(byte[] value)
Description copied from interface: DerivedKeyToken
Sets the value of the nonce property.

Specified by:
setNonce in interface DerivedKeyToken
Parameters:
value - allowed object is byte[]

setOffset

public void setOffset(BigInteger value)
Description copied from interface: DerivedKeyToken
Sets the value of the offset property.

Specified by:
setOffset in interface DerivedKeyToken
Parameters:
value - allowed object is BigInteger

setSecurityTokenReference

public void setSecurityTokenReference(SecurityTokenReferenceType value)
Description copied from interface: DerivedKeyToken
Sets the value of the securityTokenReference property.

Specified by:
setSecurityTokenReference in interface DerivedKeyToken
Parameters:
value - allowed object is SecurityTokenReferenceType

getNamespaceURI

public String getNamespaceURI()
Specified by:
getNamespaceURI in interface SecurityElement
Returns:
namespace uri of the security header element.

getLocalPart

public String getLocalPart()
Description copied from interface: SecurityElement
Gets the local name of this header element.

Specified by:
getLocalPart in interface SecurityElement
Returns:
this string must be interned.

readHeader

public XMLStreamReader readHeader()
                           throws XMLStreamException
Description copied from interface: SecurityElement
Reads the header as a XMLStreamReader.

The returned parser points at the start element of this header. (IOW, XMLStreamReader.getEventType() would return XMLStreamConstants.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:
readHeader in interface SecurityElement
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:
writeTo in interface SecurityElementWriter
Parameters:
os - OutputStream

writeTo

public void writeTo(XMLStreamWriter streamWriter)
             throws XMLStreamException
creates and writes the derived key token to the XMLStreamWriter

Specified by:
writeTo in interface SecurityElementWriter
Parameters:
streamWriter -
Throws:
XMLStreamException

refersToSecHdrWithId

public boolean refersToSecHdrWithId(String id)
checks whether this object refers to the object with the given id

Specified by:
refersToSecHdrWithId in interface SecurityHeaderElement
Parameters:
id - String
Returns:
boolean

writeTo

public void writeTo(XMLStreamWriter streamWriter,
                    HashMap props)
             throws XMLStreamException
writes the derived key to the XMLStreamWriter

Specified by:
writeTo in interface SecurityElementWriter
Parameters:
streamWriter -
props -
Throws:
XMLStreamException


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.