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

java.lang.Object
  extended by com.sun.xml.ws.security.opt.impl.keyinfo.BinarySecurityToken
All Implemented Interfaces:
BinarySecurityToken, Token, SecurityElement, SecurityElementWriter, SecurityHeaderElement

public class BinarySecurityToken
extends java.lang.Object
implements BinarySecurityToken, SecurityHeaderElement, SecurityElementWriter

Author:
K.Venugopal@sun.com

Constructor Summary
BinarySecurityToken(BinarySecurityTokenType token, com.sun.xml.ws.api.SOAPVersion sv)
          Creates a new instance of BinarySecurityToken
 
Method Summary
 java.security.cert.X509Certificate getCertificate()
           
 java.lang.String getEncodingType()
           
 java.lang.String getId()
           
 java.lang.String getLocalPart()
          Gets the local name of this header element.
 java.lang.String getNamespaceURI()
           
 byte[] getTokenValue()
          returns base64 decoded value of the binary securt token value
 java.lang.String getValueType()
           
<T> T
readAsJAXB(Bridge<T> bridge)
           
<T> T
readAsJAXB(Bridge<T> bridge, BridgeContext context)
           
<T> T
readAsJAXB(Unmarshaller unmarshaller)
           
 javax.xml.stream.XMLStreamReader readHeader()
          marshalls the BST element into the XMLStreamBuffer
 boolean refersToSecHdrWithId(java.lang.String id)
           
 void setId(java.lang.String id)
           
 void writeTo(org.xml.sax.ContentHandler contentHandler, org.xml.sax.ErrorHandler errorHandler)
           
 void writeTo(java.io.OutputStream os)
           
 void writeTo(SOAPMessage saaj)
           
 void writeTo(javax.xml.stream.XMLStreamWriter streamWriter)
          writes the binary security token to the XMLStreamWriter
 void writeTo(javax.xml.stream.XMLStreamWriter streamWriter, java.util.HashMap props)
          writes the binary security token to the XMLStreamWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinarySecurityToken

public BinarySecurityToken(BinarySecurityTokenType token,
                           com.sun.xml.ws.api.SOAPVersion sv)
Creates a new instance of BinarySecurityToken

Method Detail

getValueType

public java.lang.String getValueType()
Specified by:
getValueType in interface BinarySecurityToken

getEncodingType

public java.lang.String getEncodingType()
Specified by:
getEncodingType in interface BinarySecurityToken

getId

public java.lang.String getId()
Specified by:
getId in interface Token
Specified by:
getId in interface SecurityElement
Returns:
id

setId

public void setId(java.lang.String id)
Specified by:
setId in interface SecurityElement

getNamespaceURI

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

getLocalPart

@NotNull
public java.lang.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 javax.xml.stream.XMLStreamReader readHeader()
                                            throws javax.xml.stream.XMLStreamException
marshalls the BST element into the XMLStreamBuffer

Specified by:
readHeader in interface SecurityElement
Returns:
XMLStreamReader
Throws:
javax.xml.stream.XMLStreamException

readAsJAXB

public <T> T readAsJAXB(Unmarshaller unmarshaller)
             throws JAXBException
Throws:
JAXBException

readAsJAXB

public <T> T readAsJAXB(Bridge<T> bridge,
                        BridgeContext context)
             throws JAXBException
Throws:
JAXBException

readAsJAXB

public <T> T readAsJAXB(Bridge<T> bridge)
             throws JAXBException
Throws:
JAXBException

writeTo

public void writeTo(javax.xml.stream.XMLStreamWriter streamWriter)
             throws javax.xml.stream.XMLStreamException
writes the binary security token to the XMLStreamWriter

Specified by:
writeTo in interface SecurityElementWriter
Parameters:
streamWriter - XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeTo

public void writeTo(SOAPMessage saaj)
             throws SOAPException
Throws:
SOAPException

writeTo

public void writeTo(org.xml.sax.ContentHandler contentHandler,
                    org.xml.sax.ErrorHandler errorHandler)
             throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getTokenValue

public byte[] getTokenValue()
returns base64 decoded value of the binary securt token value

Specified by:
getTokenValue in interface BinarySecurityToken
Returns:
byte[]

writeTo

public void writeTo(java.io.OutputStream os)
Specified by:
writeTo in interface SecurityElementWriter

refersToSecHdrWithId

public boolean refersToSecHdrWithId(java.lang.String id)
Specified by:
refersToSecHdrWithId in interface SecurityHeaderElement
Returns:

getCertificate

public java.security.cert.X509Certificate getCertificate()

writeTo

public void writeTo(javax.xml.stream.XMLStreamWriter streamWriter,
                    java.util.HashMap props)
             throws javax.xml.stream.XMLStreamException
writes the binary security token to the XMLStreamWriter

Specified by:
writeTo in interface SecurityElementWriter
Parameters:
streamWriter - javax.xml.stream.XMLStreamWriter
props - HashMap
Throws:
javax.xml.stream.XMLStreamException


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