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  
  * $Id: ConnectorService.java 19191 2010-08-25 21:05:23Z tcarlson $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.module.management.mbean;
 12  
 
 13  
 import org.mule.api.MuleException;
 14  
 import org.mule.api.lifecycle.InitialisationException;
 15  
 import org.mule.api.transport.Connector;
 16  
 import org.mule.util.ObjectNameHelper;
 17  
 
 18  
 public class ConnectorService implements ConnectorServiceMBean
 19  
 {
 20  
     private final Connector connector;
 21  
     private final String name;
 22  
 
 23  
     public ConnectorService(final Connector connector)
 24  0
     {
 25  0
         this.connector = connector;
 26  0
         name = new ObjectNameHelper(connector.getMuleContext()).getConnectorName(connector);
 27  0
     }
 28  
 
 29  
     public boolean isStarted()
 30  
     {
 31  0
         return connector.isStarted();
 32  
     }
 33  
 
 34  
     public boolean isDisposed()
 35  
     {
 36  0
         return connector.isDisposed();
 37  
     }
 38  
 
 39  
     public String getName()
 40  
     {
 41  0
         return name;
 42  
     }
 43  
 
 44  
     public String getProtocol()
 45  
     {
 46  0
         return connector.getProtocol();
 47  
     }
 48  
 
 49  
     public void startConnector() throws MuleException
 50  
     {
 51  0
         connector.start();
 52  0
     }
 53  
 
 54  
     public void stopConnector() throws MuleException
 55  
     {
 56  0
         connector.stop();
 57  0
     }
 58  
 
 59  
     public void dispose()
 60  
     {
 61  0
         connector.dispose();
 62  0
     }
 63  
 
 64  
     public void initialise() throws InitialisationException
 65  
     {
 66  0
         connector.initialise();
 67  0
     }
 68  
 
 69  
 }