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