Class KeyIdentifier
java.lang.Object
com.sun.xml.ws.security.secext10.AttributedString
com.sun.xml.ws.security.secext10.EncodedString
com.sun.xml.ws.security.secext10.KeyIdentifierType
com.sun.xml.ws.security.opt.impl.reference.KeyIdentifier
- All Implemented Interfaces:
KeyIdentifier,Reference,SecurityElement,SecurityElementWriter,SecurityHeaderElement
public class KeyIdentifier
extends com.sun.xml.ws.security.secext10.KeyIdentifierType
implements KeyIdentifier, SecurityHeaderElement, SecurityElementWriter
- Author:
- Ashutosh.Shahi@sun.com
-
Field Summary
Fields inherited from class com.sun.xml.ws.security.secext10.KeyIdentifierType
valueTypeFields inherited from class com.sun.xml.ws.security.secext10.EncodedString
encodingTypeFields inherited from class com.sun.xml.ws.security.secext10.AttributedString
id, value -
Constructor Summary
ConstructorsConstructorDescriptionKeyIdentifier(com.sun.xml.ws.api.SOAPVersion sv) Creates a new instance of KeyIdentifier -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String nsUri, String localName) getAttribute(QName name) getId()Gets the local name of this header element.getType()Reads the header as aXMLStreamReader.booleanvoidsetEncodingType(String value) voidvoidsetReferenceValue(String referenceValue) voidsetValueType(String valueType) voidupdateReferenceValue(byte[] kerberosToken) voidvoidwriteTo(OutputStream os) voidwriteTo(XMLStreamWriter streamWriter) Writes out the header.voidwriteTo(XMLStreamWriter streamWriter, HashMap props) Methods inherited from class com.sun.xml.ws.security.secext10.AttributedString
getOtherAttributes, getValue, setValue
-
Constructor Details
-
KeyIdentifier
public KeyIdentifier(com.sun.xml.ws.api.SOAPVersion sv) Creates a new instance of KeyIdentifier
-
-
Method Details
-
getValueType
- Specified by:
getValueTypein interfaceKeyIdentifier- Overrides:
getValueTypein classcom.sun.xml.ws.security.secext10.KeyIdentifierType- Returns:
- the valueType attribute for KeyIdentifier
-
setValueType
- Specified by:
setValueTypein interfaceKeyIdentifier- Overrides:
setValueTypein classcom.sun.xml.ws.security.secext10.KeyIdentifierType- Parameters:
valueType- the valueType attribute for KeyIdentifier
-
getEncodingType
- Specified by:
getEncodingTypein interfaceKeyIdentifier- Overrides:
getEncodingTypein classcom.sun.xml.ws.security.secext10.EncodedString- Returns:
- the encodingType attribute
-
setEncodingType
- Specified by:
setEncodingTypein interfaceKeyIdentifier- Overrides:
setEncodingTypein classcom.sun.xml.ws.security.secext10.EncodedString- Parameters:
value- the encodingType attribute
-
getReferenceValue
- Specified by:
getReferenceValuein interfaceKeyIdentifier- Returns:
- the referenced value by this key identifier
-
setReferenceValue
- Specified by:
setReferenceValuein interfaceKeyIdentifier- Parameters:
referenceValue- the referenced value by this keyIdentifier
-
getType
-
getId
- Specified by:
getIdin interfaceSecurityElement- Overrides:
getIdin classcom.sun.xml.ws.security.secext10.AttributedString- Returns:
- id attribute
-
setId
- Specified by:
setIdin interfaceSecurityElement- Overrides:
setIdin classcom.sun.xml.ws.security.secext10.AttributedString- Parameters:
id-
-
getNamespaceURI
- Specified by:
getNamespaceURIin interfaceSecurityElement- Returns:
- namespace uri of Keyidentifier.
-
getLocalPart
Gets the local name of this header element.- Specified by:
getLocalPartin interfaceSecurityElement- Returns:
- this string must be interned.
-
getAttribute
-
getAttribute
-
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.
- Throws:
XMLStreamException
-
writeTo
Writes out the header.- Specified by:
writeToin interfaceSecurityElementWriter- Throws:
XMLStreamException- if the operation fails for some reason. This leaves the writer to an undefined state.
-
writeTo
- Specified by:
writeToin interfaceSecurityElementWriter- Parameters:
streamWriter-props-- Throws:
XMLStreamException
-
writeTo
- Specified by:
writeToin interfaceSecurityElementWriter- Parameters:
os-
-
updateReferenceValue
public void updateReferenceValue(byte[] kerberosToken) throws com.sun.xml.wss.XWSSecurityException - Throws:
com.sun.xml.wss.XWSSecurityException
-
updateReferenceValue
- Throws:
com.sun.xml.wss.XWSSecurityException
-
refersToSecHdrWithId
- Specified by:
refersToSecHdrWithIdin interfaceSecurityHeaderElement- Parameters:
id-- Returns:
-