You can work with the message properties to affect the way a message is mediated.
Interface SIMessageContext has a superinterface MessageContext. Methods in MessageContext allow you to manage a set of message properties, which enable handlers in a handler chain to share processing-related state. Most importantly, you can get the value of a specific property from the MessageContext by using the method getProperty, and you can set the name and value of a property associated with the MessageContext by using the method setProperty. You can also view the names of the properties in this MessageContext and remove a property (that is, a name-value pair) from the MessageContext.
At mediation runtime, all of the user-defined properties that have been set during configuration for the current mediation (see Configuring mediation context properties) are applied to the MediationContext property set.
public boolean handle(MessageContext context) throws MessageContextException { ........ { /* Retrieve the street name property */ String myStreetName; myStreetName = (String) getProperty(streetName); /* Display property value */ System.out.println(myStreetName); } }
In this information ...Related concepts
| IBM Redbooks, demos, education, and more(Index) |