|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.ws.security.opt.impl.outgoing.SecurityHeader
public class SecurityHeader
| Field Summary | |
|---|---|
protected int |
headerLayout
|
static int |
LAYOUT_LAX
|
static int |
LAYOUT_LAX_TS_FIRST
|
static int |
LAYOUT_LAX_TS_LAST
|
static int |
LAYOUT_STRICT
|
protected ArrayList<SecurityHeaderElement> |
secHeaderContent
|
protected String |
soapVersion
|
| Constructor Summary | |
|---|---|
SecurityHeader()
Default constructor uses Lax Message Layout and SOAP 1.1 version |
|
SecurityHeader(int layout,
String soapVersion,
boolean muValue)
|
|
| Method Summary | |
|---|---|
void |
add(SecurityHeaderElement header)
|
void |
append(SecurityHeaderElement element)
|
String |
getAttribute(QName name)
Gets the attribute value on the header element. |
String |
getAttribute(String nsUri,
String localName)
Gets the attribute value on the header element. |
SecurityHeaderElement |
getChildElement(String id)
|
SecurityHeaderElement |
getChildElement(String localName,
String uri)
|
int |
getHeaderLayout()
|
Iterator |
getHeaders(String localName,
String uri)
|
String |
getLocalPart()
Gets the local name of this header element. |
String |
getNamespaceURI()
Gets the namespace URI of this header element. |
String |
getSOAPVersion()
|
void |
prepend(SecurityHeaderElement element)
|
boolean |
replace(SecurityHeaderElement replaceThis,
SecurityHeaderElement withThis)
|
void |
setHeaderLayout(int headerLayout)
|
void |
setSOAPVersion(String soapVersion)
|
void |
writeTo(ContentHandler contentHandler,
ErrorHandler errorHandler)
Writes out the header as SAX events. |
void |
writeTo(SOAPMessage saaj)
Writes out the header to the given SOAPMessage. |
void |
writeTo(XMLStreamWriter streamWriter)
Writes out the header. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LAYOUT_LAX
public static final int LAYOUT_STRICT
public static final int LAYOUT_LAX_TS_FIRST
public static final int LAYOUT_LAX_TS_LAST
protected ArrayList<SecurityHeaderElement> secHeaderContent
protected int headerLayout
protected String soapVersion
| Constructor Detail |
|---|
public SecurityHeader()
public SecurityHeader(int layout,
String soapVersion,
boolean muValue)
| Method Detail |
|---|
public int getHeaderLayout()
public void setHeaderLayout(int headerLayout)
public String getSOAPVersion()
public void setSOAPVersion(String soapVersion)
public SecurityHeaderElement getChildElement(String localName,
String uri)
public Iterator getHeaders(String localName,
String uri)
public SecurityHeaderElement getChildElement(String id)
public void add(SecurityHeaderElement header)
public boolean replace(SecurityHeaderElement replaceThis,
SecurityHeaderElement withThis)
public void prepend(SecurityHeaderElement element)
public void append(SecurityHeaderElement element)
@NotNull public String getNamespaceURI()
@NotNull public String getLocalPart()
@Nullable
public String getAttribute(@NotNull
String nsUri,
@NotNull
String localName)
nsUri - The namespace URI of the attribute. Can be empty.localName - The local name of the attribute.
Header implementation
doesn't have to do anything.
@Nullable
public String getAttribute(@NotNull
QName name)
This is a convenience method that calls into getAttribute(String, String)
name - Never null.getAttribute(String, String)
public void writeTo(XMLStreamWriter streamWriter)
throws XMLStreamException
XMLStreamException - if the operation fails for some reason. This leaves the
writer to an undefined state.
public void writeTo(SOAPMessage saaj)
throws SOAPException
Sometimes a Message needs to produce itself
as SOAPMessage, in which case each header needs
to turn itself into a header.
SOAPException - if the operation fails for some reason. This leaves the
writer to an undefined state.
public void writeTo(ContentHandler contentHandler,
ErrorHandler errorHandler)
throws SAXException
Sometimes a Message needs to produce SAX events,
and this method is necessary for headers to participate to it.
A header is responsible for producing the SAX events for its part, including startPrefixMapping and endPrefixMapping, but not startDocument/endDocument.
Note that SAX contract requires that any error that does NOT originate
from ContentHandler (meaning any parsing error and etc) must
be first reported to ErrorHandler. If the SAX event production
cannot be continued and the processing needs to abort, the code may
then throw the same SAXParseException reported to ErrorHandler.
contentHandler - The ContentHandler that receives SAX events.errorHandler - The ErrorHandler that receives parsing errors.
SAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||