IBM WebSphere Application ServerTM
Release 7

com.ibm.websphere.sib.mediation.handler
Interface MediationHandler

All Known Subinterfaces:
GenericEJBMediationHandlerLocal

public interface MediationHandler

This interface is implemented by all mediation handlers. It is invoked by the runtime when a message arrives at a mediated destination.


Method Summary
 boolean handle(javax.xml.rpc.handler.MessageContext context)
          This method is called by the runtime when a message is to be mediated by this mediation handler.
 

Method Detail

handle

boolean handle(javax.xml.rpc.handler.MessageContext context)
               throws MessageContextException
This method is called by the runtime when a message is to be mediated by this mediation handler.

Parameters:
context - A MessageContext that allows the mediation handler to access the message to be mediated.
Returns:
boolean
true
Indicates to the runtime that the message should continue to be processed by passing it to the next destination on the forward routing path (if any), or by making it available for consumption at this destination if the forward routing path is the empty list. (The runtime will pass the message to other mediation handlers on the same handler list if they follow this mediation handler in the handler list).
false
Indicates to the runtime that the message should be immediately deleted from the destination and therefore should not be available for consumption. (The runtime will not pass the message to other mediation handlers that follow this mediation handler in the handler list).
Throws:
MessageContextException - if the runtime should immediately reroute the original version of the message to the exception destination. Any transactional work performed by the mediation (e.g. sending additional messages) should be committed by the runtime.
javax.ejb.EJBException - if any transactional work performed by the mediation should be rolled back, and the mediation should be retried. (If this causes the retry count to exceed the max retry limit, the original version of the message should be rerouted to the exception destination).
java.lang.RuntimeException - if the runtime should immediately reroute the original version of the message message to the exception destination. Any transactional work performed by the mediation (e.g. sending additional messages) should be rolled back by the runtime.
java.lang.Error - if the runtime should immediately reroute the original version of the message message to the exception destination. Any transactional work performed by the mediation (e.g. sending additional messages) should be rolled back by the runtime.

IBM WebSphere Application ServerTM
Release 7