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
  23  * questions.
  24  */
  25 
  26 package com.sun.xml.internal.ws.api.pipe;
  27 
  28 import com.sun.istack.internal.NotNull;
  29 import com.sun.istack.internal.Nullable;
  30 import com.sun.xml.internal.ws.api.model.SEIModel;
  31 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
  32 import com.sun.xml.internal.ws.api.pipe.helper.PipeAdapter;
  33 import com.sun.xml.internal.ws.api.server.WSEndpoint;
  34 
  35 import java.io.PrintStream;
  36 
  37 /**
  38  * Factory for well-known server {@link Pipe} implementations
  39  * that the {@link PipelineAssembler} needs to use
  40  * to satisfy JAX-WS requirements.
  41  *
  42  * @author Jitendra Kotamraju
  43  * @deprecated Use {@link ServerTubeAssemblerContext}.
  44  */
  45 public final class ServerPipeAssemblerContext extends ServerTubeAssemblerContext {
  46 
  47     public ServerPipeAssemblerContext(@Nullable SEIModel seiModel, @Nullable WSDLPort wsdlModel, @NotNull WSEndpoint endpoint, @NotNull Tube terminal, boolean isSynchronous) {
  48         super(seiModel, wsdlModel, endpoint, terminal, isSynchronous);
  49     }
  50 
  51     /**
  52      * Creates a {@link Pipe} that performs SOAP mustUnderstand processing.
  53      * This pipe should be before HandlerPipes.
  54      */
  55     public @NotNull Pipe createServerMUPipe(@NotNull Pipe next) {
  56         return PipeAdapter.adapt(super.createServerMUTube(PipeAdapter.adapt(next)));
  57     }
  58 
  59     /**
  60      * creates a {@link Pipe} that dumps messages that pass through.
  61      */
  62     public Pipe createDumpPipe(String name, PrintStream out, Pipe next) {
  63         return PipeAdapter.adapt(super.createDumpTube(name, out, PipeAdapter.adapt(next)));
  64     }
  65 
  66     /**
  67      * Creates a {@link Pipe} that does the monitoring of the invocation for a
  68      * container
  69      */
  70     public @NotNull Pipe createMonitoringPipe(@NotNull Pipe next) {
  71         return PipeAdapter.adapt(super.createMonitoringTube(PipeAdapter.adapt(next)));
  72     }
  73 
  74     /**
  75      * Creates a {@link Pipe} that adds container specific security
  76      */
  77     public @NotNull Pipe createSecurityPipe(@NotNull Pipe next) {
  78         return PipeAdapter.adapt(super.createSecurityTube(PipeAdapter.adapt(next)));
  79     }
  80 
  81     /**
  82      * creates a {@link Pipe} that validates messages against schema
  83      */
  84     public @NotNull Pipe createValidationPipe(@NotNull Pipe next) {
  85        return PipeAdapter.adapt(super.createValidationTube(PipeAdapter.adapt(next)));
  86     }
  87 
  88     /**
  89      * Creates a {@link Pipe} that invokes protocol and logical handlers.
  90      */
  91     public @NotNull Pipe createHandlerPipe(@NotNull Pipe next) {
  92         return PipeAdapter.adapt(super.createHandlerTube(PipeAdapter.adapt(next)));
  93     }
  94 
  95     /**
  96      * The last {@link Pipe} in the pipeline. The assembler is expected to put
  97      * additional {@link Pipe}s in front of it.
  98      *
  99      * <p>
 100      * (Just to give you the idea how this is used, normally the terminal pipe
 101      * is the one that invokes the user application or {@link javax.xml.ws.Provider}.)
 102      *
 103      * @return always non-null terminal pipe
 104      */
 105      public @NotNull Pipe getTerminalPipe() {
 106          return PipeAdapter.adapt(super.getTerminalTube());
 107     }
 108 
 109      /**
 110      * Creates WS-Addressing pipe
 111      */
 112     public Pipe createWsaPipe(Pipe next) {
 113         return PipeAdapter.adapt(super.createWsaTube(PipeAdapter.adapt(next)));
 114     }
 115 }