Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.model
Class AbstractModel

    java.lang.Object
      org.mule.model.AbstractModel

All Implemented Interfaces:
  MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, Model, NamedObject

Direct Known Subclasses:
  DirectModel, InheritedModel, JcaModel, PipelineModel, SedaModel

    public abstract class AbstractModel

extends Object
implements Model

`MuleModel` is the default implementation of the Model. The model encapsulates and manages the runtime behaviour of a Mule Server instance. It is responsible for maintaining the service instances and their configuration.

Field Summary
`static String` | `DEFAULT_MODEL_NAME`
`protected Log` | `logger`
`protected MuleContext` | `muleContext`

Fields inherited from interface org.mule.api.lifecycle.Initialisable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Startable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Stoppable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Disposable
`PHASE_NAME`

Constructor Summary
`AbstractModel()`

Method Summary
`void` | `dispose()` Destroys any current components
`EntryPointResolverSet` | `getEntryPointResolverSet()` The entry point resolver is used to determine the method to be called on a service when an event is received for it.
`ExceptionListener` | `getExceptionListener()` The exception strategy to use by components managed by the model.
`LifecycleAdapterFactory` | `getLifecycleAdapterFactory()` The lifecycle adapter is used by the model to translate Mule lifecycle event to events that components registered with the model understand.
`String` | `getName()` Gets the name of the object
`void` | `initialise()` Method used to perform any initialisation work.
`void` | `setEntryPointResolvers(Collection entryPointResolvers)` This allows us to configure entry point resolvers incrementally
`void` | `setEntryPointResolverSet(EntryPointResolverSet entryPointResolverSet)` This will be used to build entry points on the components registered with the model.
`void` | `setExceptionListener(ExceptionListener exceptionListener)` The exception strategy to use by components managed by the model.
`void` | `setLifecycleAdapterFactory(LifecycleAdapterFactory lifecycleAdapterFactory)` Sets the lifecycleAdapterFactory on the model.
`void` | `setMuleContext(MuleContext context)`
`void` | `setName(String name)` Sets the name of the object
`void` | `start()` Starts all registered components
`void` | `stop()` Stops any registered components
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.mule.api.model.Model
`getType`

Field Detail

### DEFAULT_MODEL_NAME

    public static final String DEFAULT_MODEL_NAME

See Also:
  Constant Field Values

### logger

    protected transient Log logger

### muleContext

    protected MuleContext muleContext

Constructor Detail

### AbstractModel

    public AbstractModel()

Method Detail

### getName

    public String getName()

  Description copied from interface: `NamedObject`
  Gets the name of the object

  Specified by:
    `getName` in interface `NamedObject`
  Returns:
    the name of the object

### setName

    public void setName(String name)

  Description copied from interface: `NamedObject`
  Sets the name of the object

  Specified by:
    `setName` in interface `NamedObject`
  Parameters:
    `name` - the name of the object

### getEntryPointResolverSet

    public EntryPointResolverSet getEntryPointResolverSet()

  Description copied from interface: `Model`
  The entry point resolver is used to determine the method to be called on a service when an event is received for it.

  Specified by:
    `getEntryPointResolverSet` in interface `Model`
  Returns:
    Returns the entryPointResolver.

### setEntryPointResolverSet

    public void setEntryPointResolverSet(EntryPointResolverSet entryPointResolverSet)

  Description copied from interface: `Model`
  This will be used to build entry points on the components registered with the model.

  Specified by:
    `setEntryPointResolverSet` in interface `Model`
  Parameters:
    `entryPointResolverSet` - The entryPointResolver to set. This will be used to build entry points on the components registered with the model.

### setEntryPointResolvers

    public void setEntryPointResolvers(Collection entryPointResolvers)

  This allows us to configure entry point resolvers incrementally

  Parameters:
    `entryPointResolvers` - Resolvers to add

### getLifecycleAdapterFactory

    public LifecycleAdapterFactory getLifecycleAdapterFactory()

  Description copied from interface: `Model`
  The lifecycle adapter is used by the model to translate Mule lifecycle event to events that components registered with the model understand. The `LifecycleAdapterFactory` is used by the model to instanciate LifecycleAdapters.

  Specified by:
    `getLifecycleAdapterFactory` in interface `Model`
  Returns:
    Returns the lifecycleAdapterFactory used by this Model.
  See Also:
    `LifecycleAdapterFactory`, `LifecycleAdapter`

### setLifecycleAdapterFactory

    public void setLifecycleAdapterFactory(LifecycleAdapterFactory lifecycleAdapterFactory)

  Description copied from interface: `Model`
  Sets the lifecycleAdapterFactory on the model.

  Specified by:
    `setLifecycleAdapterFactory` in interface `Model`
  Parameters:
    `lifecycleAdapterFactory` - The lifecycleAdapterFactory to set on this model.
  See Also:
    `LifecycleAdapterFactory`, `LifecycleAdapter`

### dispose

    public void dispose()

  Destroys any current components

  Specified by:
    `dispose` in interface `Disposable`

### stop

    public void stop()
              throws MuleException

  Stops any registered components

  Specified by:
    `stop` in interface `Stoppable`
  Throws:
    `MuleException` - if a Service fails tcomponent

### start

    public void start()
               throws MuleException

  Starts all registered components

  Specified by:
    `start` in interface `Startable`
  Throws:
    `MuleException` - if any of the components fail to start

### initialise

    public void initialise()
                    throws InitialisationException

  Description copied from interface: `Initialisable`
  Method used to perform any initialisation work. If a fatal error occurs during initialisation an `InitialisationException` should be thrown, causing the Mule instance to shutdown. If the error is recoverable, say by retrying to connect, a `RecoverableException` should be thrown. There is no guarantee that by throwing a Recoverable exception that the Mule instance will not shut down.

  Specified by:
    `initialise` in interface `Initialisable`
  Throws:
    `InitialisationException` - if a fatal error occurs causing the Mule instance to shutdown
    `RecoverableException` - if an error occurs that can be recovered from

### getExceptionListener

    public ExceptionListener getExceptionListener()

  Description copied from interface: `Model`
  The exception strategy to use by components managed by the model. The exception strategy is used when an exception occurs while processing the current event for a service. A service can define it's own exception strategy, but if it doesn't this implmentation will be used.

  Specified by:
    `getExceptionListener` in interface `Model`
  Returns:
    the default exception strategy for this model.
  See Also:
    `ExceptionListener`

### setExceptionListener

    public void setExceptionListener(ExceptionListener exceptionListener)

  Description copied from interface: `Model`
  The exception strategy to use by components managed by the model. The exception strategy is used when an exception occurs while processing the current event for a service. A service can define it's own exception strategy, but if it doesn't this implmentation will be used.

  Specified by:
    `setExceptionListener` in interface `Model`
  Parameters:
    `exceptionListener` - the default exception strategy for this model.
  See Also:
    `ExceptionListener`

### setMuleContext

    public void setMuleContext(MuleContext context)

  Specified by:
    `setMuleContext` in interface `MuleContextAware`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.