It may be necessary to access and modify JMS message headers or content when invoking a service or receiving a request. Fabric3 provides a generic binding handler framework that can be extended to provide low-level access to JMS messages.
To do this, a class that implements org.fabric3.spi.binding.handler.BindingHandler
must be provided as a Fabric3 extension components:
Code Block | ||||
---|---|---|---|---|
| ||||
public interface BindingHandler<T> {
/**
* The fully qualified binding name corresponding to the SCA architected binding name scheme binding.xxxx.
*
* @return the fully qualified binding name
*/
QName getType();
/**
* Handles an outbound (reference-side) message.
*
* @param context the binding-specific transport context
* @param message the current message
*/
void handleOutbound(Message message, T context);
/**
* Handles an inbound (service-side) message.
*
* @param context the binding-specific transport context
* @param message the current message
*/
void handleInbound(T context, Message message);
}
|
BindingHandler
implementations that require access Web Service SOAP messages must use javax.jms.Message
as the parameterized type. Below is an example handler: