Coverage Report - org.mule.transport.soap.axis.AxisInitialisationCallback
 
Classes in this File Line Coverage Branch Coverage Complexity
AxisInitialisationCallback
0%
0/13
0%
0/6
3
 
 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.transport.soap.axis;
 8  
 
 9  
 import org.mule.api.lifecycle.InitialisationCallback;
 10  
 import org.mule.api.lifecycle.InitialisationException;
 11  
 
 12  
 import org.apache.axis.handlers.soap.SOAPService;
 13  
 import org.apache.commons.logging.Log;
 14  
 import org.apache.commons.logging.LogFactory;
 15  
 
 16  
 /**
 17  
  * <code>AxisInitialisationCallback</code> is invoked when an Axis component is
 18  
  * created from its descriptor.
 19  
  */
 20  
 public class AxisInitialisationCallback implements InitialisationCallback
 21  
 {
 22  0
     protected static final Log logger = LogFactory.getLog(AxisInitialisationCallback.class);
 23  
 
 24  
     private SOAPService service;
 25  0
     private boolean invoked = false;
 26  
 
 27  
     public AxisInitialisationCallback(SOAPService service)
 28  0
     {
 29  0
         this.service = service;
 30  0
     }
 31  
 
 32  
     public void initialise(Object component) throws InitialisationException
 33  
     {
 34  
         // only call this once
 35  0
         if (invoked)
 36  
         {
 37  0
             return;
 38  
         }
 39  0
         if (component instanceof AxisInitialisable)
 40  
         {
 41  0
             if (logger.isDebugEnabled())
 42  
             {
 43  0
                 logger.debug("Calling axis initialisation for component: " + component.getClass().getName());
 44  
             }
 45  0
             ((AxisInitialisable)component).initialise(service);
 46  
         }
 47  0
         invoked = true;
 48  0
     }
 49  
 }