src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ServerTubeAssemblerContext.java

Print this page


   1 /*
   2  * Copyright (c) 1997, 2010, 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


 208      * Creates WS-Addressing pipe
 209      */
 210     public Tube createWsaTube(Tube next) {
 211         if (binding instanceof SOAPBinding && AddressingVersion.isEnabled(binding)) {
 212             if(AddressingVersion.fromBinding(binding) == AddressingVersion.MEMBER) {
 213                 return new MemberSubmissionWsaServerTube(endpoint, wsdlModel, binding, next);
 214             } else {
 215                 return new W3CWsaServerTube(endpoint, wsdlModel, binding, next);
 216             }
 217         } else
 218             return next;
 219     }
 220 
 221     /**
 222      * Gets the {@link Codec} that is set by {@link #setCodec} or the default codec
 223      * based on the binding. The codec is a full codec that is responsible for
 224      * encoding/decoding entire protocol message(for e.g: it is responsible to
 225      * encode/decode entire MIME messages in SOAP binding)
 226      *
 227      * @return codec to be used for web service requests
 228      * @see {@link Codecs}
 229      */
 230     public @NotNull Codec getCodec() {
 231         return codec;
 232     }
 233 
 234     /**
 235      * Interception point to change {@link Codec} during {@link Tube}line assembly. The
 236      * new codec will be used by jax-ws server runtime for encoding/decoding web service
 237      * request/response messages. {@link WSEndpoint#createCodec()} will return a copy
 238      * of this new codec and will be used in the server runtime.
 239      *
 240      * <p>
 241      * The codec is a full codec that is responsible for
 242      * encoding/decoding entire protocol message(for e.g: it is responsible to
 243      * encode/decode entire MIME messages in SOAP binding)
 244      *
 245      * <p>
 246      * the codec should correctly implement {@link Codec#copy} since it is used while
 247      * serving requests concurrently.
 248      *
 249      * @param codec codec to be used for web service requests
 250      * @see {@link Codecs}
 251      */
 252     public void setCodec(@NotNull Codec codec) {
 253         this.codec = codec;
 254     }
 255 
 256 }
   1 /*
   2  * Copyright (c) 1997, 2012, 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


 208      * Creates WS-Addressing pipe
 209      */
 210     public Tube createWsaTube(Tube next) {
 211         if (binding instanceof SOAPBinding && AddressingVersion.isEnabled(binding)) {
 212             if(AddressingVersion.fromBinding(binding) == AddressingVersion.MEMBER) {
 213                 return new MemberSubmissionWsaServerTube(endpoint, wsdlModel, binding, next);
 214             } else {
 215                 return new W3CWsaServerTube(endpoint, wsdlModel, binding, next);
 216             }
 217         } else
 218             return next;
 219     }
 220 
 221     /**
 222      * Gets the {@link Codec} that is set by {@link #setCodec} or the default codec
 223      * based on the binding. The codec is a full codec that is responsible for
 224      * encoding/decoding entire protocol message(for e.g: it is responsible to
 225      * encode/decode entire MIME messages in SOAP binding)
 226      *
 227      * @return codec to be used for web service requests
 228      * @see Codecs
 229      */
 230     public @NotNull Codec getCodec() {
 231         return codec;
 232     }
 233 
 234     /**
 235      * Interception point to change {@link Codec} during {@link Tube}line assembly. The
 236      * new codec will be used by jax-ws server runtime for encoding/decoding web service
 237      * request/response messages. {@link WSEndpoint#createCodec()} will return a copy
 238      * of this new codec and will be used in the server runtime.
 239      *
 240      * <p>
 241      * The codec is a full codec that is responsible for
 242      * encoding/decoding entire protocol message(for e.g: it is responsible to
 243      * encode/decode entire MIME messages in SOAP binding)
 244      *
 245      * <p>
 246      * the codec should correctly implement {@link Codec#copy} since it is used while
 247      * serving requests concurrently.
 248      *
 249      * @param codec codec to be used for web service requests
 250      * @see Codecs
 251      */
 252     public void setCodec(@NotNull Codec codec) {
 253         this.codec = codec;
 254     }
 255 
 256 }