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.module.guice
Class AbstractMuleGuiceModule

    java.lang.Object
      com.google.inject.AbstractModule
          org.mule.module.guice.AbstractMuleGuiceModule

All Implemented Interfaces:
  com.google.inject.Module

    public abstract class AbstractMuleGuiceModule

extends com.google.inject.AbstractModule

A mule specific Guice module that allows users to override the `configureMuleContext(org.mule.api.MuleContext)` method to do any Mule configuration such as register notifications. Most users will not need to override this method so the `AbstractModule` can be used.

Note that Mule objects such as Connectors and Agents can be registered in a Guice module too. To do this create provider methods on a module and mark with the `Provides` annotation.

Its recommended that you put all your Mule configuration objects in a separate Guice module.

Field Summary
`protected MuleContext` | `muleContext`

Constructor Summary
`AbstractMuleGuiceModule()`

Method Summary
`protected void` | `configure()`
`void` | `configureMuleContext(MuleContext muleContext)`
`protected EndpointBuilder` | `createEndpointBuilder(String uri)` Creates an `EndpointBuilder` instance for the endpoint uri.
`protected abstract void` | `doConfigure()`
`protected void` | `initialiseObject(Object o)` A convenience method that will register an object in the registry using its hashcode as the key.

Methods inherited from class com.google.inject.AbstractModule
`addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding`

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

Field Detail

### muleContext

    protected MuleContext muleContext

Constructor Detail

### AbstractMuleGuiceModule

    public AbstractMuleGuiceModule()

Method Detail

### configureMuleContext

    public void configureMuleContext(MuleContext muleContext)

### configure

    protected final void configure()

  Specified by:
    `configure` in class `com.google.inject.AbstractModule`

### doConfigure

    protected abstract void doConfigure()
                                 throws Exception

  Throws:
    `Exception`

### createEndpointBuilder

    protected EndpointBuilder createEndpointBuilder(String uri)
                                             throws MuleException

  Creates an `EndpointBuilder` instance for the endpoint uri. The builder can be used to add further configuration options and then used to create either `OutboundEndpoint` or `InboundEndpoint` instances.

  Parameters:
    `uri` - the address URI for the endpoint
  Returns:
    and EndpointBuilder instance that can be used to create endpoints
  Throws:
    `MuleException` - if the builder cannt be created for any reason

### initialiseObject

    protected void initialiseObject(Object o)
                             throws RegistrationException

  A convenience method that will register an object in the registry using its hashcode as the key. This will cause the object to have any objects injected and lifecycle methods called. Note that the object lifecycle will be called to the same current lifecycle as the MuleContext

  Parameters:
    `o` - the object to register and initialise it
  Throws:
    `RegistrationException`

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.