...
servicemix-quartz
...
Creating a Custom Marshaler
Creating a custom marshaler is actually a pretty easy task. Depending on what kind of marshaler you need to create, you may take a different approach. For example, when creating a custom marshaler for the servicemix-http, you might just need to extend the DefaultHttpConsumerMarshaler
or the DefaultHttpProviderMarshaler
to override the createExchange()
and sendOut()
methods. Because the servicemix-http component provides its own base classes in HttpConsumerMarshaler
and HttpProviderMarshaler
which are specifically designed for use with the HTTP protocol. Oftentimes it's easier to extend one of these existing marshalers, but this is certainly not the only approach.
You can also create a custom marshaler from scratch by extending the MarshalerSupport
class.
...
Older stuff
Questions:
- My initial questions about this area were based on the apparent ad-hoc implementations of the marshalers (from the class diagram).
- I thought that the interface Marshaler was intended as a base for all marshalers.
- I was also confused why some marshalers are standalone, while others derive from a common base (MarshalerSupport).
- Yet more have interfaces (eg FileMarshaler), but there is no consistency
– PS
...
Wiki Markup |
---|
Notes \[19/12\]: |
...
- SM devs refactored interface Marshaler to PojoMarshaler to reduce confusion about purpose of Marshaler
Class diagram showing ServiceMix 2.0.2 marshalers