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 manveen.kaur@sun.com, K.Venugopal@sun.com
-
-
Field Summary
Fields Modifier and Type Field Description StringSECURITY_CONTEXT_TOKEN-
Fields inherited from class com.sun.xml.ws.security.secconv.impl.wssx.bindings.SecurityContextTokenType
any, id
-
-
Constructor Summary
Constructors Constructor Description SecurityContextToken13(SecurityContextTokenType sTokenType, SOAPVersion sv)SecurityContextToken13(URI identifier, String instance, String wsuId, SOAPVersion sv)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]canonicalize(String algorithm, List<AttributeNS> namespaceDecls)StringgetAttribute(String nsUri, String localName)StringgetAttribute(QName name)ListgetExtElements()URIgetIdentifier()StringgetInstance()StringgetLocalPart()Gets the local name of this header element.StringgetNamespaceURI()ObjectgetTokenValue()The token ValueStringgetType()The type of the TokenStringgetWsuId()booleanisCanonicalized()XMLStreamReaderreadHeader()Reads the header as aXMLStreamReader.booleanrefersToSecHdrWithId(String id)voidsetIdentifier(URI identifier)voidsetInstance(String instance)voidsetWsuId(String wsuId)voidwriteTo(OutputStream os)writes the SecurityContextToken to the OutputStreamvoidwriteTo(XMLStreamWriter streamWriter)writes the SecurityContextToken to the XMLStreamWritervoidwriteTo(XMLStreamWriter streamWriter, HashMap props)writes the SecurityContextToken to the XMLStreamWriter-
Methods 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 Detail
-
SECURITY_CONTEXT_TOKEN
public final String SECURITY_CONTEXT_TOKEN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SecurityContextToken13
public SecurityContextToken13(URI identifier, String instance, String wsuId, SOAPVersion sv)
-
SecurityContextToken13
public SecurityContextToken13(SecurityContextTokenType sTokenType, SOAPVersion sv)
-
-
Method Detail
-
getIdentifier
public URI getIdentifier()
- Specified by:
getIdentifierin interfaceSecurityContextToken
-
setIdentifier
public void setIdentifier(URI identifier)
-
getInstance
public String getInstance()
- Specified by:
getInstancein interfaceSecurityContextToken
-
setInstance
public void setInstance(String instance)
-
setWsuId
public void setWsuId(String wsuId)
-
getWsuId
public String getWsuId()
- Specified by:
getWsuIdin interfaceSecurityContextToken
-
getTokenValue
public Object getTokenValue()
Description copied from interface:TokenThe token Value- Specified by:
getTokenValuein interfaceToken
-
getExtElements
public List getExtElements()
- Specified by:
getExtElementsin interfaceSecurityContextToken
-
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)
writes the SecurityContextToken to the OutputStream- Specified by:
writeToin interfaceSecurityElementWriter- Parameters:
os- OutputStream
-
writeTo
public void writeTo(XMLStreamWriter streamWriter) throws XMLStreamException
writes the SecurityContextToken to the XMLStreamWriter- Specified by:
writeToin interfaceSecurityElementWriter- Parameters:
streamWriter- javax.xml.stream.XMLStreamWriter- Throws:
XMLStreamException
-
canonicalize
public byte[] canonicalize(String algorithm, List<AttributeNS> namespaceDecls)
-
isCanonicalized
public boolean isCanonicalized()
-
refersToSecHdrWithId
public boolean refersToSecHdrWithId(String id)
- Specified by:
refersToSecHdrWithIdin interfaceSecurityHeaderElement- Returns:
-
writeTo
public void writeTo(XMLStreamWriter streamWriter, HashMap props) throws XMLStreamException
writes the SecurityContextToken to the XMLStreamWriter- Specified by:
writeToin interfaceSecurityElementWriter- Parameters:
streamWriter-props-- Throws:
XMLStreamException
-
-