Coverage Report - org.mule.module.management.mbean.ConnectorService
 
Classes in this File Line Coverage Branch Coverage Complexity
ConnectorService
28%
5/18
N/A
1
 
 1  
 /*
 2  
  * $Id: ConnectorService.java 11517 2008-03-31 21:34:19Z dirk.olmes $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.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  
 import java.beans.ExceptionListener;
 19  
 
 20  
 public class ConnectorService implements ConnectorServiceMBean
 21  
 {
 22  
     private final Connector connector;
 23  
     private final String name;
 24  
 
 25  
     public ConnectorService(final Connector connector)
 26  6
     {
 27  6
         this.connector = connector;
 28  6
         name = ObjectNameHelper.getConnectorName(connector);
 29  6
     }
 30  
 
 31  
     public boolean isStarted()
 32  
     {
 33  0
         return connector.isStarted();
 34  
     }
 35  
 
 36  
     public boolean isDisposed()
 37  
     {
 38  0
         return connector.isDisposed();
 39  
     }
 40  
 
 41  
     public boolean isDisposing()
 42  
     {
 43  0
         return connector.isDisposing();
 44  
     }
 45  
 
 46  
     public String getName()
 47  
     {
 48  6
         return name;
 49  
     }
 50  
 
 51  
     public String getProtocol()
 52  
     {
 53  0
         return connector.getProtocol();
 54  
     }
 55  
 
 56  
     public ExceptionListener getExceptionListener()
 57  
     {
 58  0
         return connector.getExceptionListener();
 59  
     }
 60  
 
 61  
     public void startConnector() throws MuleException
 62  
     {
 63  0
         connector.start();
 64  0
     }
 65  
 
 66  
     public void stopConnector() throws MuleException
 67  
     {
 68  0
         connector.stop();
 69  0
     }
 70  
 
 71  
     public void dispose()
 72  
     {
 73  0
         connector.dispose();
 74  0
     }
 75  
 
 76  
     public void initialise() throws InitialisationException
 77  
     {
 78  0
         connector.initialise();
 79  0
     }
 80  
 
 81  
 }