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

java.lang.Object
  extended by com.sun.xml.ws.security.secconv.impl.wssx.bindings.SecurityContextTokenType
      extended by 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
 String SECURITY_CONTEXT_TOKEN
           
 
Fields inherited from class com.sun.xml.ws.security.secconv.impl.wssx.bindings.SecurityContextTokenType
any, id
 
Constructor Summary
SecurityContextToken13(SecurityContextTokenType sTokenType, SOAPVersion sv)
           
SecurityContextToken13(URI identifier, String instance, String wsuId, SOAPVersion sv)
           
 
Method Summary
 byte[] canonicalize(String algorithm, List<AttributeNS> namespaceDecls)
           
 String getAttribute(QName name)
           
 String getAttribute(String nsUri, String localName)
           
 List getExtElements()
           
 URI getIdentifier()
           
 String getInstance()
           
 String getLocalPart()
          Gets the local name of this header element.
 String getNamespaceURI()
           
 Object getTokenValue()
          The token Value
 String getType()
          The type of the Token
 String getWsuId()
           
 boolean isCanonicalized()
           
 XMLStreamReader readHeader()
          Reads the header as a XMLStreamReader.
 boolean refersToSecHdrWithId(String id)
           
 void setIdentifier(URI identifier)
           
 void setInstance(String instance)
           
 void setWsuId(String wsuId)
           
 void writeTo(OutputStream os)
          writes the SecurityContextToken to the OutputStream
 void writeTo(XMLStreamWriter streamWriter)
          writes the SecurityContextToken to the XMLStreamWriter
 void writeTo(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:
getIdentifier in interface SecurityContextToken

setIdentifier

public void setIdentifier(URI identifier)

getInstance

public String getInstance()
Specified by:
getInstance in interface SecurityContextToken

setInstance

public void setInstance(String instance)

setWsuId

public void setWsuId(String wsuId)

getWsuId

public String getWsuId()
Specified by:
getWsuId in interface SecurityContextToken

getType

public String getType()
Description copied from interface: Token
The type of the Token

Specified by:
getType in interface Token

getTokenValue

public Object getTokenValue()
Description copied from interface: Token
The token Value

Specified by:
getTokenValue in interface Token

getExtElements

public List getExtElements()
Specified by:
getExtElements in interface SecurityContextToken

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.

getAttribute

public String getAttribute(String nsUri,
                           String localName)

getAttribute

public String getAttribute(QName name)

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)
writes the SecurityContextToken to the OutputStream

Specified by:
writeTo in interface SecurityElementWriter
Parameters:
os - OutputStream

writeTo

public void writeTo(XMLStreamWriter streamWriter)
             throws XMLStreamException
writes the SecurityContextToken to the XMLStreamWriter

Specified by:
writeTo in interface SecurityElementWriter
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:
refersToSecHdrWithId in interface SecurityHeaderElement
Returns:

writeTo

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

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


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