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 Object
implements BinarySecurityToken, SecurityHeaderElement, SecurityElementWriter

Author:
K.Venugopal@sun.com

Constructor Summary
BinarySecurityToken(BinarySecurityTokenType token, SOAPVersion sv)
          Creates a new instance of BinarySecurityToken
 
Method Summary
 X509Certificate getCertificate()
           
 String getEncodingType()
           
 String getId()
           
 String getLocalPart()
          Gets the local name of this header element.
 String getNamespaceURI()
           
 byte[] getTokenValue()
          returns base64 decoded value of the binary securt token value
 String getValueType()
           
<T> T
readAsJAXB(Bridge<T> bridge)
           
<T> T
readAsJAXB(Bridge<T> bridge, BridgeContext context)
           
<T> T
readAsJAXB(Unmarshaller unmarshaller)
           
 XMLStreamReader readHeader()
          marshalls the BST element into the XMLStreamBuffer
 boolean refersToSecHdrWithId(String id)
           
 void setId(String id)
           
 void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler)
           
 void writeTo(OutputStream os)
           
 void writeTo(SOAPMessage saaj)
           
 void writeTo(XMLStreamWriter streamWriter)
          writes the binary security token to the XMLStreamWriter
 void writeTo(XMLStreamWriter streamWriter, 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,
                           SOAPVersion sv)
Creates a new instance of BinarySecurityToken

Method Detail

getValueType

public String getValueType()
Specified by:
getValueType in interface BinarySecurityToken

getEncodingType

public String getEncodingType()
Specified by:
getEncodingType in interface BinarySecurityToken

getId

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

setId

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

getNamespaceURI

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

getLocalPart

@NotNull
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.

readHeader

public XMLStreamReader readHeader()
                           throws XMLStreamException
marshalls the BST element into the XMLStreamBuffer

Specified by:
readHeader in interface SecurityElement
Returns:
XMLStreamReader
Throws:
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(XMLStreamWriter streamWriter)
             throws XMLStreamException
writes the binary security token to the XMLStreamWriter

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

writeTo

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

writeTo

public void writeTo(ContentHandler contentHandler,
                    ErrorHandler errorHandler)
             throws SAXException
Throws:
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(OutputStream os)
Specified by:
writeTo in interface SecurityElementWriter

refersToSecHdrWithId

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

getCertificate

public X509Certificate getCertificate()

writeTo

public void writeTo(XMLStreamWriter streamWriter,
                    HashMap props)
             throws XMLStreamException
writes the binary security token to the XMLStreamWriter

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


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