Coverage Report - org.apache.camel.component.cxf.CxfEndpoint
 
Classes in this File Line Coverage Branch Coverage Complexity
CxfEndpoint
0% 
0% 
0
 
 1  
 /**
 2  
  * Licensed to the Apache Software Foundation (ASF) under one or more
 3  
  * contributor license agreements.  See the NOTICE file distributed with
 4  
  * this work for additional information regarding copyright ownership.
 5  
  * The ASF licenses this file to You under the Apache License, Version 2.0
 6  
  * (the "License"); you may not use this file except in compliance with
 7  
  * the License.  You may obtain a copy of the License at
 8  
  *
 9  
  *      http://www.apache.org/licenses/LICENSE-2.0
 10  
  *
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 package org.apache.camel.component.cxf;
 18  
 
 19  
 import org.apache.camel.Consumer;
 20  
 import org.apache.camel.Processor;
 21  
 import org.apache.camel.Producer;
 22  
 import org.apache.camel.impl.DefaultEndpoint;
 23  
 import org.apache.cxf.BusException;
 24  
 import org.apache.cxf.message.Message;
 25  
 import org.apache.cxf.service.model.EndpointInfo;
 26  
 import org.apache.cxf.transport.local.LocalTransportFactory;
 27  
 
 28  
 /**
 29  
  * Defines the <a href="http://activemq.apache.org/camel/cxf.html">CXF Endpoint</a>
 30  
  * 
 31  
  * @version $Revision: 563665 $
 32  
  */
 33  0
 public class CxfEndpoint extends DefaultEndpoint<CxfExchange> {
 34  
     private CxfBinding binding;
 35  
     private final CxfComponent component;
 36  
     private final EndpointInfo endpointInfo;
 37  0
     private boolean inOut = true;
 38  
 
 39  
     public CxfEndpoint(String uri, CxfComponent component, EndpointInfo endpointInfo) {
 40  0
         super(uri, component);
 41  0
         this.component = component;
 42  0
         this.endpointInfo = endpointInfo;
 43  0
     }
 44  
 
 45  
     public Producer<CxfExchange> createProducer() throws Exception {
 46  0
         return new CxfProducer(this, getLocalTransportFactory());
 47  
     }
 48  
 
 49  
     public Consumer<CxfExchange> createConsumer(Processor processor) throws Exception {
 50  0
         return new CxfConsumer(this, processor, getLocalTransportFactory());
 51  
     }
 52  
 
 53  
     public CxfExchange createExchange() {
 54  0
         return new CxfExchange(getContext(), getBinding());
 55  
     }
 56  
 
 57  
     public CxfExchange createExchange(Message inMessage) {
 58  0
         return new CxfExchange(getContext(), getBinding(), inMessage);
 59  
     }
 60  
 
 61  
     public CxfBinding getBinding() {
 62  0
         if (binding == null) {
 63  0
             binding = new CxfBinding();
 64  
         }
 65  0
         return binding;
 66  
     }
 67  
 
 68  
     public void setBinding(CxfBinding binding) {
 69  0
         this.binding = binding;
 70  0
     }
 71  
 
 72  
     public boolean isInOut() {
 73  0
         return inOut;
 74  
     }
 75  
 
 76  
     public void setInOut(boolean inOut) {
 77  0
         this.inOut = inOut;
 78  0
     }
 79  
 
 80  
     public LocalTransportFactory getLocalTransportFactory() throws BusException {
 81  0
         return component.getLocalTransportFactory();
 82  
     }
 83  
 
 84  
     public EndpointInfo getEndpointInfo() {
 85  0
         return endpointInfo;
 86  
     }
 87  
 
 88  
     public CxfComponent getComponent() {
 89  0
         return component;
 90  
     }
 91  
 
 92  
     public boolean isSingleton() {
 93  0
         return true;
 94  
     }
 95  
 
 96  
 }