Coverage Report - org.mule.api.model.Model
 
Classes in this File Line Coverage Branch Coverage Complexity
Model
N/A
N/A
1
 
 1  
 /*
 2  
  * $Id: Model.java 11379 2008-03-17 02:46:56Z dfeist $
 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.api.model;
 12  
 
 13  
 import org.mule.api.NamedObject;
 14  
 import org.mule.api.component.LifecycleAdapterFactory;
 15  
 import org.mule.api.context.MuleContextAware;
 16  
 import org.mule.api.lifecycle.Lifecycle;
 17  
 
 18  
 import java.beans.ExceptionListener;
 19  
 
 20  
 /**
 21  
  * The <code>Model</code> encapsulates and manages the runtime behaviour of a
 22  
  * Mule Server instance. It is responsible for maintaining the UMOs instances and
 23  
  * their configuration.
 24  
  */
 25  
 public interface Model extends Lifecycle, MuleContextAware, NamedObject
 26  
 {
 27  
     /**
 28  
      * Returns the model type name. This is a friendly identifier that is used to
 29  
      * look up the SPI class for the model
 30  
      *
 31  
      * @return the model type
 32  
      */
 33  
     String getType();
 34  
 
 35  
     /**
 36  
      * The entry point resolver is used to determine the method to be called on a
 37  
      * service when an event is received for it.
 38  
      *
 39  
      * @return Returns the entryPointResolver.
 40  
      */
 41  
     EntryPointResolverSet getEntryPointResolverSet();
 42  
 
 43  
     /**
 44  
      * This will be used to build entry points on the components registered with the
 45  
      * model.
 46  
      *
 47  
      * @param entryPointResolver The entryPointResolver to set. This will be used to
 48  
      *                           build entry points on the components registered with the model.
 49  
      */
 50  
     void setEntryPointResolverSet(EntryPointResolverSet entryPointResolver);
 51  
 
 52  
     /**
 53  
      * The lifecycle adapter is used by the model to translate Mule lifecycle event
 54  
      * to events that UMO components registered with the model understand. The
 55  
      * <code>LifecycleAdapterFactory</code> is used by the model to instanciate
 56  
      * LifecycleAdapters.
 57  
      *
 58  
      * @return Returns the lifecycleAdapterFactory used by this Model.
 59  
      * @see LifecycleAdapterFactory
 60  
      * @see org.mule.api.component.LifecycleAdapter
 61  
      */
 62  
     LifecycleAdapterFactory getLifecycleAdapterFactory();
 63  
 
 64  
     /**
 65  
      * Sets the lifecycleAdapterFactory on the model.
 66  
      *
 67  
      * @param lifecycleAdapterFactory The lifecycleAdapterFactory to set on this
 68  
      *                                model.
 69  
      * @see LifecycleAdapterFactory
 70  
      * @see org.mule.api.component.LifecycleAdapter
 71  
      */
 72  
     void setLifecycleAdapterFactory(LifecycleAdapterFactory lifecycleAdapterFactory);
 73  
 
 74  
     /**
 75  
      * The exception strategy to use by components managed by the model. The
 76  
      * exception strategy is used when an exception occurs while processing the
 77  
      * current event for a service. A service can define it's own exception
 78  
      * strategy, but if it doesn't this implmentation will be used.
 79  
      *
 80  
      * @return the default exception strategy for this model.
 81  
      * @see ExceptionListener
 82  
      */
 83  
     ExceptionListener getExceptionListener();
 84  
 
 85  
     /**
 86  
      * The exception strategy to use by components managed by the model. The
 87  
      * exception strategy is used when an exception occurs while processing the
 88  
      * current event for a service. A service can define it's own exception
 89  
      * strategy, but if it doesn't this implmentation will be used.
 90  
      *
 91  
      * @param listener the default exception strategy for this model.
 92  
      * @see ExceptionListener
 93  
      */
 94  
     void setExceptionListener(ExceptionListener listener);
 95  
 
 96  
 }