src/share/jaxws_classes/com/sun/xml/internal/ws/message/EmptyMessageImpl.java

Print this page
rev 472 : 8036030: Update JAX-WS RI integration to latest version
   1 /*
   2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  59         super(version);
  60         this.headers = new HeaderList(version);
  61         this.attachmentSet = new AttachmentSetImpl();
  62     }
  63 
  64     public EmptyMessageImpl(MessageHeaders headers, @NotNull AttachmentSet attachmentSet, SOAPVersion version){
  65         super(version);
  66         if(headers==null)
  67             headers = new HeaderList(version);
  68         this.attachmentSet = attachmentSet;
  69         this.headers = headers;
  70     }
  71 
  72     /**
  73      * Copy constructor.
  74      */
  75     private EmptyMessageImpl(EmptyMessageImpl that) {
  76         super(that);
  77         this.headers = new HeaderList(that.headers);
  78         this.attachmentSet = that.attachmentSet;

  79     }
  80 
  81     public boolean hasHeaders() {
  82         return headers.hasHeaders();
  83     }
  84 
  85     public MessageHeaders getHeaders() {
  86         return headers;
  87     }
  88 
  89     public String getPayloadLocalPart() {
  90         return null;
  91     }
  92 
  93     public String getPayloadNamespaceURI() {
  94         return null;
  95     }
  96 
  97     public boolean hasPayload() {
  98         return false;
  99     }
 100 
 101     public Source readPayloadAsSource() {
 102         return null;
 103     }
 104 
 105     public XMLStreamReader readPayload() throws XMLStreamException {
 106         return null;
 107     }
 108 
 109     public void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException {
 110         // noop
 111     }
 112 
 113     public void writePayloadTo(ContentHandler contentHandler, ErrorHandler errorHandler, boolean fragment) throws SAXException {
 114         // noop
 115     }
 116 
 117     public Message copy() {
 118         return new EmptyMessageImpl(this);
 119     }
 120 
 121 }
   1 /*
   2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  59         super(version);
  60         this.headers = new HeaderList(version);
  61         this.attachmentSet = new AttachmentSetImpl();
  62     }
  63 
  64     public EmptyMessageImpl(MessageHeaders headers, @NotNull AttachmentSet attachmentSet, SOAPVersion version){
  65         super(version);
  66         if(headers==null)
  67             headers = new HeaderList(version);
  68         this.attachmentSet = attachmentSet;
  69         this.headers = headers;
  70     }
  71 
  72     /**
  73      * Copy constructor.
  74      */
  75     private EmptyMessageImpl(EmptyMessageImpl that) {
  76         super(that);
  77         this.headers = new HeaderList(that.headers);
  78         this.attachmentSet = that.attachmentSet;
  79         this.copyFrom(that);
  80     }
  81 
  82     public boolean hasHeaders() {
  83         return headers.hasHeaders();
  84     }
  85 
  86     public MessageHeaders getHeaders() {
  87         return headers;
  88     }
  89 
  90     public String getPayloadLocalPart() {
  91         return null;
  92     }
  93 
  94     public String getPayloadNamespaceURI() {
  95         return null;
  96     }
  97 
  98     public boolean hasPayload() {
  99         return false;
 100     }
 101 
 102     public Source readPayloadAsSource() {
 103         return null;
 104     }
 105 
 106     public XMLStreamReader readPayload() throws XMLStreamException {
 107         return null;
 108     }
 109 
 110     public void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException {
 111         // noop
 112     }
 113 
 114     public void writePayloadTo(ContentHandler contentHandler, ErrorHandler errorHandler, boolean fragment) throws SAXException {
 115         // noop
 116     }
 117 
 118     public Message copy() {
 119         return new EmptyMessageImpl(this).copyFrom(this);
 120     }
 121 
 122 }