1 package org.objectweb.celtix.bus.ws.rm; 2 3 import javax.xml.ws.handler.MessageContext; 4 5 import org.objectweb.celtix.ws.rm.JAXWSRMConstants; 6 import org.objectweb.celtix.ws.rm.RMProperties; 7 8 11 12 public final class RMContextUtils { 13 14 17 private RMContextUtils() { 18 } 19 20 public static RMProperties retrieveRMProperties(MessageContext context, boolean outbound) { 21 return (RMProperties)context.get(getRMPropertiesKey(outbound)); 22 } 23 24 public static void storeRMProperties(MessageContext context, RMProperties rmps, boolean outbound) { 25 String key = getRMPropertiesKey(outbound); 26 context.put(key, rmps); 27 context.setScope(key, MessageContext.Scope.HANDLER); 28 } 29 30 private static String getRMPropertiesKey(boolean outbound) { 31 return outbound ? JAXWSRMConstants.RM_PROPERTIES_OUTBOUND : JAXWSRMConstants.RM_PROPERTIES_INBOUND; 32 } 33 34 } 35 | Popular Tags |