Coverage Report - org.mule.endpoint.EndpointURIEndpointBuilder
 
Classes in this File Line Coverage Branch Coverage Complexity
EndpointURIEndpointBuilder
0%
0/46
0%
0/4
0
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.endpoint;
 8  
 
 9  
 import org.mule.api.MuleContext;
 10  
 import org.mule.api.endpoint.EndpointException;
 11  
 import org.mule.api.endpoint.EndpointURI;
 12  
 import org.mule.api.endpoint.ImmutableEndpoint;
 13  
 import org.mule.api.processor.MessageProcessor;
 14  
 
 15  
 import java.util.Collections;
 16  
 
 17  
 public class EndpointURIEndpointBuilder extends AbstractEndpointBuilder
 18  
 {
 19  
 
 20  
     public EndpointURIEndpointBuilder()
 21  
     {
 22  0
         super();
 23  0
     }
 24  
 
 25  
     /**
 26  
      * Called from Spring
 27  
      * 
 28  
      * @param global The global endpoint "Policy"
 29  
      */
 30  
     public EndpointURIEndpointBuilder(EndpointURIEndpointBuilder global) throws EndpointException
 31  
     {
 32  0
         super();
 33  
         
 34  
         // can't (concisely) use setters where null is a possibility
 35  
         // for consistency, set directly on all fields (this also avoids logic in
 36  
         // getters)
 37  0
         uriBuilder = global.uriBuilder;
 38  0
         connector = global.connector;
 39  0
         name = global.name; // this seems a bit odd, but is tested for in the big
 40  
                             // spring config test case
 41  0
         properties = global.properties;
 42  0
         transactionConfig = global.transactionConfig;
 43  0
         deleteUnacceptedMessages = global.deleteUnacceptedMessages;
 44  0
         synchronous = global.synchronous;
 45  0
         messageExchangePattern = global.messageExchangePattern;
 46  0
         responseTimeout = global.responseTimeout;
 47  0
         encoding = global.encoding;
 48  0
         retryPolicyTemplate = global.retryPolicyTemplate;
 49  0
         messageProcessors = global.messageProcessors;
 50  0
         responseMessageProcessors = global.responseMessageProcessors;
 51  0
         mimeType = global.mimeType;
 52  0
         disableTransportTransformer = global.disableTransportTransformer;
 53  0
         transformers = global.transformers;
 54  0
         responseTransformers = global.responseTransformers;
 55  
 
 56  0
     }
 57  
 
 58  
     public EndpointURIEndpointBuilder(URIBuilder builder)
 59  
     {
 60  0
         super();
 61  0
         this.uriBuilder = builder;
 62  0
         this.muleContext = builder.getMuleContext();
 63  0
     }
 64  
 
 65  
     public EndpointURIEndpointBuilder(String address, MuleContext muleContext)
 66  
     {
 67  0
         this(new URIBuilder(address, muleContext));
 68  0
     }
 69  
 
 70  
     protected EndpointURIEndpointBuilder(EndpointURI endpointURI)
 71  
     {
 72  0
         this(new URIBuilder(endpointURI));
 73  0
     }
 74  
 
 75  
     public EndpointURIEndpointBuilder(ImmutableEndpoint source)
 76  
     {
 77  0
         this(source.getEndpointURI());
 78  0
         setName(source.getName());
 79  0
         setEncoding(source.getEncoding());
 80  0
         setConnector(source.getConnector());
 81  0
         setProperties(source.getProperties());
 82  0
         setTransactionConfig(source.getTransactionConfig());
 83  0
         setDeleteUnacceptedMessages(source.isDeleteUnacceptedMessages());
 84  0
         setInitialState(source.getInitialState());
 85  0
         setResponseTimeout(source.getResponseTimeout());
 86  0
         setRetryPolicyTemplate(source.getRetryPolicyTemplate());
 87  0
         setExchangePattern(source.getExchangePattern());
 88  0
         setMuleContext(source.getMuleContext());
 89  0
         setMessageProcessors(source.getMessageProcessors().isEmpty() ? Collections.<MessageProcessor>emptyList() : source.getMessageProcessors());
 90  0
         setResponseMessageProcessors(source.getResponseMessageProcessors().isEmpty() ? Collections.<MessageProcessor>emptyList() : source.getResponseMessageProcessors());
 91  0
         setDisableTransportTransformer(source.isDisableTransportTransformer());
 92  0
         setMimeType(source.getMimeType());
 93  0
     }
 94  
 }