This project has retired. For details please refer to its Attic page.
OpenCMISTubeAssembler xref

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   * http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.chemistry.opencmis.commons.impl.tube;
20  
21  import org.apache.chemistry.opencmis.commons.impl.tube.client.WssMUTube;
22  import org.apache.chemistry.opencmis.commons.impl.tube.server.WssTube;
23  
24  import com.sun.xml.ws.api.pipe.ClientTubeAssemblerContext;
25  import com.sun.xml.ws.api.pipe.ServerTubeAssemblerContext;
26  import com.sun.xml.ws.api.pipe.Tube;
27  import com.sun.xml.ws.api.pipe.TubelineAssembler;
28  
29  /**
30   * Assembler for OpenCMIS client and server tubelines.
31   */
32  public class OpenCMISTubeAssembler implements TubelineAssembler {
33  
34      public Tube createClient(ClientTubeAssemblerContext context) {
35          Tube head = context.createTransportTube();
36          head = context.createSecurityTube(head);
37          head = context.createWsaTube(head);
38          head = new WssMUTube(context.getBinding(), head);
39  
40          return context.createHandlerTube(head);
41      }
42  
43      public Tube createServer(ServerTubeAssemblerContext context) {
44          Tube head = context.getTerminalTube();
45          head = new WssTube(head);
46          head = context.createHandlerTube(head);
47          head = context.createMonitoringTube(head);
48          head = context.createServerMUTube(head);
49          head = context.createWsaTube(head);
50          head = context.createSecurityTube(head);
51  
52          return head;
53      }
54  }