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