Coverage Report - org.apache.camel.component.activemq.ActiveMQComponent
 
Classes in this File Line Coverage Branch Coverage Complexity
ActiveMQComponent
53% 
N/A 
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.activemq;
 18  
 
 19  
 import org.apache.camel.CamelContext;
 20  
 import org.apache.camel.component.jms.JmsComponent;
 21  
 import org.apache.camel.component.jms.JmsConfiguration;
 22  
 
 23  
 /**
 24  
  * The <a href="http://activemq.apache.org/camel/activemq.html">ActiveMQ Component</a>
 25  
  *
 26  
  * @version $Revision: 1.1 $
 27  
  */
 28  16
 public class ActiveMQComponent extends JmsComponent {
 29  
     /**
 30  
      * Creates an <a href="http://activemq.apache.org/camel/activemq.html">ActiveMQ Component</a>
 31  
      *
 32  
      * @return the created component
 33  
      */
 34  
     public static ActiveMQComponent activeMQComponent() {
 35  0
         return new ActiveMQComponent();
 36  
     }
 37  
 
 38  
     /**
 39  
      * Creates an <a href="http://activemq.apache.org/camel/activemq.html">ActiveMQ Component</a>
 40  
      * connecting to the given <a href="http://activemq.apache.org/configuring-transports.html">broker URL</a>
 41  
      *
 42  
      * @param brokerURL the URL to connect to
 43  
      * @return the created component
 44  
      */
 45  
     public static ActiveMQComponent activeMQComponent(String brokerURL) {
 46  3
         ActiveMQComponent answer = new ActiveMQComponent();
 47  3
         answer.getConfiguration().setBrokerURL(brokerURL);
 48  3
         return answer;
 49  
     }
 50  
 
 51  5
     public ActiveMQComponent() {
 52  5
     }
 53  
 
 54  
     public ActiveMQComponent(CamelContext context) {
 55  0
         super(context);
 56  0
     }
 57  
 
 58  
     public ActiveMQComponent(ActiveMQConfiguration configuration) {
 59  0
         super(configuration);
 60  0
     }
 61  
 
 62  
     @Override
 63  
     public ActiveMQConfiguration getConfiguration() {
 64  19
         return (ActiveMQConfiguration) super.getConfiguration();
 65  
     }
 66  
 
 67  
     public void setBrokerURL(String brokerURL) {
 68  0
         getConfiguration().setBrokerURL(brokerURL);
 69  0
     }
 70  
 
 71  
 
 72  
     @Override
 73  
     protected JmsConfiguration createConfiguration() {
 74  5
         return new ActiveMQConfiguration();
 75  
     }
 76  
 }