Class SecurityContextToken13
java.lang.Object
com.sun.xml.ws.security.secconv.impl.wssx.bindings.SecurityContextTokenType
com.sun.xml.ws.security.opt.impl.keyinfo.SecurityContextToken13
- All Implemented Interfaces:
SecurityElement
,SecurityElementWriter
,SecurityHeaderElement
,SecurityContextToken
,Token
public class SecurityContextToken13
extends SecurityContextTokenType
implements SecurityHeaderElement, SecurityElementWriter, SecurityContextToken
SecurityContextToken Implementation
- Author:
- Manveen Kaur [email protected], [email protected]
-
Field Summary
Fields inherited from class com.sun.xml.ws.security.secconv.impl.wssx.bindings.SecurityContextTokenType
any, id
-
Constructor Summary
ConstructorDescriptionSecurityContextToken13
(SecurityContextTokenType sTokenType, SOAPVersion sv) SecurityContextToken13
(URI identifier, String instance, String wsuId, SOAPVersion sv) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
canonicalize
(String algorithm, List<AttributeNS> namespaceDecls) getAttribute
(String nsUri, String localName) getAttribute
(QName name) Gets the local name of this header element.The token ValuegetType()
The type of the TokengetWsuId()
boolean
Reads the header as aXMLStreamReader
.boolean
void
setIdentifier
(URI identifier) void
setInstance
(String instance) void
void
writeTo
(OutputStream os) writes the SecurityContextToken to the OutputStreamvoid
writeTo
(XMLStreamWriter streamWriter) writes the SecurityContextToken to the XMLStreamWritervoid
writeTo
(XMLStreamWriter streamWriter, HashMap props) writes the SecurityContextToken to the XMLStreamWriterMethods inherited from class com.sun.xml.ws.security.secconv.impl.wssx.bindings.SecurityContextTokenType
getAny, getId, getOtherAttributes, setId
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sun.xml.ws.security.opt.api.SecurityElement
getId, setId
-
Field Details
-
SECURITY_CONTEXT_TOKEN
- See Also:
-
-
Constructor Details
-
SecurityContextToken13
-
SecurityContextToken13
-
-
Method Details
-
getIdentifier
- Specified by:
getIdentifier
in interfaceSecurityContextToken
-
setIdentifier
-
getInstance
- Specified by:
getInstance
in interfaceSecurityContextToken
-
setInstance
-
setWsuId
-
getWsuId
- Specified by:
getWsuId
in interfaceSecurityContextToken
-
getType
Description copied from interface:Token
The type of the Token -
getTokenValue
Description copied from interface:Token
The token Value- Specified by:
getTokenValue
in interfaceToken
-
getExtElements
- Specified by:
getExtElements
in interfaceSecurityContextToken
-
getNamespaceURI
- Specified by:
getNamespaceURI
in interfaceSecurityElement
- Returns:
- namespace uri of the security header element.
-
getLocalPart
Description copied from interface:SecurityElement
Gets the local name of this header element.- Specified by:
getLocalPart
in interfaceSecurityElement
- Returns:
- this string must be interned.
-
getAttribute
-
getAttribute
-
readHeader
Description copied from interface:SecurityElement
Reads 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:
readHeader
in interfaceSecurityElement
- Returns:
- must not null.
- Throws:
XMLStreamException
-
writeTo
writes the SecurityContextToken to the OutputStream- Specified by:
writeTo
in interfaceSecurityElementWriter
- Parameters:
os
- OutputStream
-
writeTo
writes the SecurityContextToken to the XMLStreamWriter- Specified by:
writeTo
in interfaceSecurityElementWriter
- Parameters:
streamWriter
- javax.xml.stream.XMLStreamWriter- Throws:
XMLStreamException
-
canonicalize
-
isCanonicalized
public boolean isCanonicalized() -
refersToSecHdrWithId
- Specified by:
refersToSecHdrWithId
in interfaceSecurityHeaderElement
- Returns:
-
writeTo
writes the SecurityContextToken to the XMLStreamWriter- Specified by:
writeTo
in interfaceSecurityElementWriter
- Parameters:
streamWriter
-props
-- Throws:
XMLStreamException
-