Coverage Report - org.mule.module.management.mbean.ConnectorService
 
Classes in this File Line Coverage Branch Coverage Complexity
ConnectorService
0%
0/16
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.module.management.mbean;
 8  
 
 9  
 import org.mule.api.MuleException;
 10  
 import org.mule.api.lifecycle.InitialisationException;
 11  
 import org.mule.api.transport.Connector;
 12  
 import org.mule.util.ObjectNameHelper;
 13  
 
 14  
 public class ConnectorService implements ConnectorServiceMBean
 15  
 {
 16  
     private final Connector connector;
 17  
     private final String name;
 18  
 
 19  
     public ConnectorService(final Connector connector)
 20  0
     {
 21  0
         this.connector = connector;
 22  0
         name = new ObjectNameHelper(connector.getMuleContext()).getConnectorName(connector);
 23  0
     }
 24  
 
 25  
     public boolean isStarted()
 26  
     {
 27  0
         return connector.isStarted();
 28  
     }
 29  
 
 30  
     public boolean isDisposed()
 31  
     {
 32  0
         return connector.isDisposed();
 33  
     }
 34  
 
 35  
     public String getName()
 36  
     {
 37  0
         return name;
 38  
     }
 39  
 
 40  
     public String getProtocol()
 41  
     {
 42  0
         return connector.getProtocol();
 43  
     }
 44  
 
 45  
     public void startConnector() throws MuleException
 46  
     {
 47  0
         connector.start();
 48  0
     }
 49  
 
 50  
     public void stopConnector() throws MuleException
 51  
     {
 52  0
         connector.stop();
 53  0
     }
 54  
 
 55  
     public void dispose()
 56  
     {
 57  0
         connector.dispose();
 58  0
     }
 59  
 
 60  
     public void initialise() throws InitialisationException
 61  
     {
 62  0
         connector.initialise();
 63  0
     }
 64  
 
 65  
 }