Chapter 13. Using the Mule API

 

In this chapter

  • Communicating with the MuleClient
  • Using context objects to interact with Mule
  • AOP with component interceptors
  • Leveraging the notification framework

The previous 12 chapters of this book should’ve convinced you that a lot can be achieved with Mule with minimal coding, or at least without any Mule-specific code to write. For example, we’ve seen that Mule goes to great lengths to let you reuse your existing business logic as-is. This is great news because no one wants to write code that’s coupled to a particular framework, as it creates a potential implementation lock-in and weakens the code by making it sensitive to API changes.

But there are times when it’s worth considering the trade-off between framework coupling and the advanced features it offers. Using Mule’s API allows you to implement advanced behaviors that are cumbersome or even impossible to roll out when staying away from the framework. In fact, since Mule is “a lightweight messaging framework and highly distributable object broker,” staying away from its API would amount to denying half of its nature.

13.1. Piggybacking the Mule client

13.2. Exploring the Mule context

13.3. Digging the Mule event context

13.4. Keeping abreast with Mule

13.5. Summary