Java Doc for HeaderList.java in  » 6.0-JDK-Modules » jax-ws-runtime » com » sun » xml » ws » api » message » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » jax ws runtime » com.sun.xml.ws.api.message 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.sun.xml.ws.api.message.HeaderList

HeaderList
final public class HeaderList extends ArrayList
(Code)
A list of Header s on a Message .

This list can be modified to add headers from outside a Message , this is necessary since intermediate processing layers often need to put additional headers.

Following the SOAP convention, the order among headers are not significant. However, Codec s are expected to preserve the order of headers in the input message as much as possible.

MustUnderstand Processing

To perform SOAP mustUnderstang processing correctly, we need to keep track of headers that are understood and headers that are not. This is a collaborative process among Pipe s, thus it's something a Pipe author needs to keep in mind.

Specifically, when a Pipe sees a header and processes it (that is, if it did enough computing with the header to claim that the header is understood), then it should mark the corresponding header as "understood". For example, when a pipe that handles JAX-WSA examins the <wsa:To> header, it can claim that it understood the header. But for example, if a pipe that does the signature verification checks <wsa:To> for a signature, that would not be considered as "understood".

There are two ways to mark a header as understood:

  1. Use one of the getXXX methods that take a boolean markAsUnderstood parameter. Most often, a Pipe knows it's going to understand a header as long as it's present, so this is the easiest and thus the preferred way. For example, if JAX-WSA looks for <wsa:To>, then it can set markAsUnderstand to true, to do the obtaining of a header and marking at the same time.
  2. Call HeaderList.understood(int) . If under a rare circumstance, a pipe cannot determine whether it can understand it or not when you are fetching a header, then you can use this method afterward to mark it as understood.

Intuitively speaking, at the end of the day, if a header is not understood but Header.isIgnorable(SOAPVersionSet) is false, a bad thing will happen. The actual implementation of the checking is more complicated, for that see ClientMUTube / ServerMUTube .
See Also:   Message.getHeaders




Constructor Summary
public  HeaderList()
     Creates an empty HeaderList .
public  HeaderList(HeaderList that)
     Copy constructor.

Method Summary
public  booleanadd(Header header)
     Adds a new Header .

Order doesn't matter in headers, so this method does not make any guarantee as to where the new header is inserted. always true.

public  voidaddAll(Header... headers)
     Adds all the headers.
public static  HeaderListcopy(HeaderList original)
     Creates a copy.
public  voidfillRequestAddressingHeaders(Packet packet, AddressingVersion av, SOAPVersion sv, boolean oneway, String action)
     Creates a set of outbound WS-Addressing headers on the client with the specified Action Message Addressing Property value.

This method needs to be invoked right after such a Message is created which is error prone but so far only MEX, RM and JAX-WS creates a request so this ugliness is acceptable.

public  voidfillRequestAddressingHeaders(WSDLPort wsdlPort, WSBinding binding, Packet packet)
     Creates a set of outbound WS-Addressing headers on the client with the default Action Message Addressing Property value.

This method needs to be invoked right after such a Message is created which is error prone but so far only MEX, RM and JAX-WS creates a request so this ugliness is acceptable.

public  Headerget(int index)
     Gets the Header at the specified index.
public  Headerget(String nsUri, String localName, boolean markAsUnderstood)
     Gets the first Header of the specified name.
Parameters:
  markAsUnderstood - If this parameter is true, the returned header willbe marked as "understood".
public  Headerget(String nsUri, String localName)
    
public  Headerget(QName name, boolean markAsUnderstood)
     Gets the first Header of the specified name.
Parameters:
  markAsUnderstood - If this parameter is true, the returned header willbe marked as "understood".
public  Headerget(QName name)
    
public  StringgetAction(AddressingVersion av, SOAPVersion sv)
     Returns the value of WS-Addressing Action header.
public  WSEndpointReferencegetFaultTo(AddressingVersion av, SOAPVersion sv)
     Returns the value of WS-Addressing FaultTo header.
public  Iterator<Header>getHeaders(String nsUri, String localName)
    
public  Iterator<Header>getHeaders(String nsUri, String localName, boolean markAsUnderstood)
     Gets all the Header s of the specified name, including duplicates (if any.)
Parameters:
  markAsUnderstood - If this parameter is true, the returned headers willbe marked as "understood" when they are returnedfrom Iterator.next.
public  Iterator<Header>getHeaders(QName headerName, boolean markAsUnderstood)
    
public  Iterator<Header>getHeaders(String nsUri)
    
public  Iterator<Header>getHeaders(String nsUri, boolean markAsUnderstood)
    
public  StringgetMessageID(AddressingVersion av, SOAPVersion sv)
     Returns the value of WS-Addressing MessageID header.
public  WSEndpointReferencegetReplyTo(AddressingVersion av, SOAPVersion sv)
     Returns the value of WS-Addressing ReplyTo header.
public  StringgetTo(AddressingVersion av, SOAPVersion sv)
     Returns the value of WS-Addressing To header.
public  booleanisUnderstood(int index)
     Returns true if a Header at the given index was "understood".
public  voidreadResponseAddressingHeaders(WSDLPort wsdlPort, WSBinding binding)
    
public  Headerremove(int index)
    
public  booleanremove(Object o)
    
public  booleanremoveAll(Collection c)
    
public  booleanretainAll(Collection c)
    
public  intsize()
     The number of total headers.
public  voidunderstood(int index)
     Marks the Header at the specified index as "understood".
public  voidunderstood(Header header)
     Marks the specified Header as "understood".


Constructor Detail
HeaderList
public HeaderList()(Code)
Creates an empty HeaderList .



HeaderList
public HeaderList(HeaderList that)(Code)
Copy constructor.




Method Detail
add
public boolean add(Header header)(Code)
Adds a new Header .

Order doesn't matter in headers, so this method does not make any guarantee as to where the new header is inserted. always true. Don't use the return value.




addAll
public void addAll(Header... headers)(Code)
Adds all the headers.



copy
public static HeaderList copy(HeaderList original)(Code)
Creates a copy. This handles null HeaderList correctly.
Parameters:
  original - Can be null, in which case null will be returned.



fillRequestAddressingHeaders
public void fillRequestAddressingHeaders(Packet packet, AddressingVersion av, SOAPVersion sv, boolean oneway, String action)(Code)
Creates a set of outbound WS-Addressing headers on the client with the specified Action Message Addressing Property value.

This method needs to be invoked right after such a Message is created which is error prone but so far only MEX, RM and JAX-WS creates a request so this ugliness is acceptable. This method is also used to create protocol messages that are not associated with any WSBinding and WSDLPort .
Parameters:
  packet - request packet
Parameters:
  av - WS-Addressing version
Parameters:
  sv - SOAP version
Parameters:
  oneway - Indicates if the message exchange pattern is oneway
Parameters:
  action - Action Message Addressing Property value




fillRequestAddressingHeaders
public void fillRequestAddressingHeaders(WSDLPort wsdlPort, WSBinding binding, Packet packet)(Code)
Creates a set of outbound WS-Addressing headers on the client with the default Action Message Addressing Property value.

This method needs to be invoked right after such a Message is created which is error prone but so far only MEX, RM and JAX-WS creates a request so this ugliness is acceptable. If more components are identified using this, then we may revisit this.

This method is used if default Action Message Addressing Property is to be used. See HeaderList.fillRequestAddressingHeaders(Packet,com.sun.xml.ws.api.addressing.AddressingVersion,com.sun.xml.ws.api.SOAPVersion,boolean,String) if non-default Action is to be used, for example when creating a protocol message not associated with WSBinding and WSDLPort . This method uses SOAPAction as the Action unless set expplicitly in the wsdl.
Parameters:
  wsdlPort - request WSDL port
Parameters:
  binding - request WSBinding
Parameters:
  packet - request packet




get
public Header get(int index)(Code)
Gets the Header at the specified index.

This method does not mark the returned Header as understood.
See Also:   HeaderList.understood(int)




get
public Header get(String nsUri, String localName, boolean markAsUnderstood)(Code)
Gets the first Header of the specified name.
Parameters:
  markAsUnderstood - If this parameter is true, the returned header willbe marked as "understood". null if not found.



get
public Header get(String nsUri, String localName)(Code)
HeaderList.get(String,String,boolean)



get
public Header get(QName name, boolean markAsUnderstood)(Code)
Gets the first Header of the specified name.
Parameters:
  markAsUnderstood - If this parameter is true, the returned header willbe marked as "understood". nullif not found.



get
public Header get(QName name)(Code)
HeaderList.get(QName)



getAction
public String getAction(AddressingVersion av, SOAPVersion sv)(Code)
Returns the value of WS-Addressing Action header. The version identifies the WS-Addressing version and the header returned is targeted at the current implicit role. Caches the value for subsequent invocation. Duplicate Action headers are detected earlier.
Parameters:
  av - WS-Addressing version
Parameters:
  sv - SOAP version
throws:
  IllegalArgumentException - if either av or sv is null. Value of WS-Addressing Action header, null if no header is present



getFaultTo
public WSEndpointReference getFaultTo(AddressingVersion av, SOAPVersion sv)(Code)
Returns the value of WS-Addressing FaultTo header. The version identifies the WS-Addressing version and the header returned is targeted at the current implicit role. Caches the value for subsequent invocation. Duplicate FaultTo headers are detected earlier.
Parameters:
  av - WS-Addressing version
Parameters:
  sv - SOAP version
throws:
  IllegalArgumentException - if either av or sv is null. Value of WS-Addressing FaultTo header, null if no header is present



getHeaders
public Iterator<Header> getHeaders(String nsUri, String localName)(Code)
HeaderList.getHeaders(String,String,boolean)



getHeaders
public Iterator<Header> getHeaders(String nsUri, String localName, boolean markAsUnderstood)(Code)
Gets all the Header s of the specified name, including duplicates (if any.)
Parameters:
  markAsUnderstood - If this parameter is true, the returned headers willbe marked as "understood" when they are returnedfrom Iterator.next. empty iterator if not found.



getHeaders
public Iterator<Header> getHeaders(QName headerName, boolean markAsUnderstood)(Code)

See Also:   HeaderList.getHeaders(String,String,boolean)



getHeaders
public Iterator<Header> getHeaders(String nsUri)(Code)
HeaderList.getHeaders(String,boolean)



getHeaders
public Iterator<Header> getHeaders(String nsUri, boolean markAsUnderstood)(Code)
Gets an iteration of headers Header in the specified namespace, including duplicates (if any.)
Parameters:
  markAsUnderstood - If this parameter is true, the returned headers willbe marked as "understood" when they are returnedfrom Iterator.next.empty iterator if not found.



getMessageID
public String getMessageID(AddressingVersion av, SOAPVersion sv)(Code)
Returns the value of WS-Addressing MessageID header. The version identifies the WS-Addressing version and the header returned is targeted at the current implicit role. Caches the value for subsequent invocation. Duplicate MessageID headers are detected earlier.
Parameters:
  av - WS-Addressing version
Parameters:
  sv - SOAP version
throws:
  WebServiceException - if either av or sv is null. Value of WS-Addressing MessageID header, null if no header is present



getReplyTo
public WSEndpointReference getReplyTo(AddressingVersion av, SOAPVersion sv)(Code)
Returns the value of WS-Addressing ReplyTo header. The version identifies the WS-Addressing version and the header returned is targeted at the current implicit role. Caches the value for subsequent invocation. Duplicate ReplyTo headers are detected earlier.
Parameters:
  av - WS-Addressing version
Parameters:
  sv - SOAP version
throws:
  IllegalArgumentException - if either av or sv is null. Value of WS-Addressing ReplyTo header, null if no header is present



getTo
public String getTo(AddressingVersion av, SOAPVersion sv)(Code)
Returns the value of WS-Addressing To header. The version identifies the WS-Addressing version and the header returned is targeted at the current implicit role. Caches the value for subsequent invocation. Duplicate To headers are detected earlier.
Parameters:
  av - WS-Addressing version
Parameters:
  sv - SOAP version
throws:
  IllegalArgumentException - if either av or sv is null. Value of WS-Addressing To header, anonymous URI if no header is present



isUnderstood
public boolean isUnderstood(int index)(Code)
Returns true if a Header at the given index was "understood".



readResponseAddressingHeaders
public void readResponseAddressingHeaders(WSDLPort wsdlPort, WSBinding binding)(Code)



remove
public Header remove(int index)(Code)
HeaderList



remove
public boolean remove(Object o)(Code)
HeaderList



removeAll
public boolean removeAll(Collection c)(Code)
HeaderList



retainAll
public boolean retainAll(Collection c)(Code)
HeaderList



size
public int size()(Code)
The number of total headers.



understood
public void understood(int index)(Code)
Marks the Header at the specified index as "understood".



understood
public void understood(Header header)(Code)
Marks the specified Header as "understood". ArrayListPipe
throws:
  IllegalArgumentException - if the given header is not HeaderList.contains(Object) containedin this header.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.