Coverage Report - org.mule.config.spring.factories.OutboundEndpointFactoryBean
 
Classes in this File Line Coverage Branch Coverage Complexity
OutboundEndpointFactoryBean
0%
0/9
N/A
1
 
 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.config.spring.factories;
 8  
 
 9  
 import org.mule.api.endpoint.EndpointBuilder;
 10  
 import org.mule.api.endpoint.EndpointException;
 11  
 import org.mule.api.endpoint.OutboundEndpoint;
 12  
 import org.mule.api.registry.ServiceType;
 13  
 import org.mule.endpoint.EndpointURIEndpointBuilder;
 14  
 import org.mule.transport.service.TransportServiceDescriptor;
 15  
 
 16  
 /**
 17  
  * Spring FactoryBean used to create concrete instances of outbound endpoints
 18  
  */
 19  
 public class OutboundEndpointFactoryBean extends AbstractEndpointFactoryBean
 20  
 {
 21  
 
 22  
     public OutboundEndpointFactoryBean(EndpointURIEndpointBuilder global) throws EndpointException
 23  
     {
 24  0
         super(global);
 25  0
     }
 26  
 
 27  
     public OutboundEndpointFactoryBean()
 28  
     {
 29  0
         super();
 30  0
     }
 31  
     
 32  
     public Class getObjectType()
 33  
     {
 34  0
         return OutboundEndpoint.class;
 35  
     }
 36  
 
 37  
     public Object doGetObject() throws Exception
 38  
     {
 39  
         // If this is a meta endpoint, then we can wrap it using the meta endpoint builder from the TransportServiceDescriptor
 40  0
         String scheme = getEndpointBuilder().getEndpoint().getFullScheme();
 41  0
         TransportServiceDescriptor tsd = (TransportServiceDescriptor) muleContext.getRegistry().lookupServiceDescriptor(ServiceType.TRANSPORT, scheme, null);
 42  0
         EndpointBuilder endpointBuilder = tsd.createEndpointBuilder(this);
 43  
         
 44  0
         return muleContext.getEndpointFactory().getOutboundEndpoint(endpointBuilder);
 45  
     }
 46  
 
 47  
 }