public void setScope(String arg0, Scope arg1) { context.setScope(arg0, arg1); }
/** * Store UsingAddressing override flag in the context * * @param override true if UsingAddressing should be overridden * @param context the message context */ public static void storeUsingAddressing(boolean override, MessageContext context) { context.put(USING_PROPERTY, Boolean.valueOf(override)); context.setScope(USING_PROPERTY, MessageContext.Scope.APPLICATION); }
/** * Store MAP fault reason in the context. * * @param reason the fault reason to store * @param context the message context */ public static void storeMAPFaultReason(String reason, MessageContext context) { context.put(MAP_FAULT_REASON_PROPERTY, reason); context.setScope(MAP_FAULT_REASON_PROPERTY, MessageContext.Scope.HANDLER); }
/** * Store async oneway dispatch property in message context. * * @param context the message context * @param async value of the dispatch property */ public static void storeAsyncOnewayDispatch(MessageContext context, boolean async) { context.put(ASYNC_ONEWAY_DISPATCH, async ? Boolean.TRUE : Boolean.FALSE); context.setScope(ASYNC_ONEWAY_DISPATCH, MessageContext.Scope.HANDLER); }
/** * Store server binding endpoint callback in message context. * * @param context the message context * @param sbec the server binding endpoint callback */ public static void storeServerBindingEndpointCallback(MessageContext context, ServerBindingEndpointCallback sbec) { context.put(SERVER_BINDING_ENDPOINT_CALLBACK_PROPERTY, sbec); context.setScope(SERVER_BINDING_ENDPOINT_CALLBACK_PROPERTY, MessageContext.Scope.HANDLER); }
/** * Store To EPR in the context * * @param to the To EPR * @param context the message context */ public static void storeTo(EndpointReferenceType to, MessageContext context) { context.put(TO_PROPERTY, to); context.setScope(TO_PROPERTY, MessageContext.Scope.APPLICATION); }
/** * Store bad MAP fault name in the context. * * @param faultName the fault name to store * @param context the message context */ public static void storeMAPFaultName(String faultName, MessageContext context) { context.put(MAP_FAULT_NAME_PROPERTY, faultName); context.setScope(MAP_FAULT_NAME_PROPERTY, MessageContext.Scope.HANDLER); }
/** * Store dispatch property in message context. * * @param context the message context * @param dispatch value of the dispatch property */ public static void storeDispatch(MessageContext context, boolean dispatch) { context.put(DISPATCH_PROPERTY, dispatch ? Boolean.TRUE : Boolean.FALSE); context.setScope(DISPATCH_PROPERTY, MessageContext.Scope.HANDLER); }
/** * Store ReplyTo EPR in the context * * @param replyTo the ReplyTo EPR * @param context the message context */ public static void storeReplyTo(EndpointReferenceType replyTo, MessageContext context) { context.put(REPLYTO_PROPERTY, replyTo); context.setScope(REPLYTO_PROPERTY, MessageContext.Scope.APPLICATION); }
protected final void setFault(MessageContext context, Exception ex) { context.put(ObjectMessageContext.METHOD_FAULT, ex); context.setScope(ObjectMessageContext.METHOD_FAULT, MessageContext.Scope.HANDLER); } }
/** * Store data binding callback in message context. * * @param context the message context * @param callback the data binding callback */ public static void storeDataBindingCallback(MessageContext context, DataBindingCallback callback) { context.put(DATABINDING_CALLBACK_PROPERTY, callback); context.setScope(DATABINDING_CALLBACK_PROPERTY, MessageContext.Scope.HANDLER); }
/** * Store decoupled response property in message context. * * @param context the message context * @param decoupled value of the decoupled response property */ public static void storeDecoupledResponse(MessageContext context, boolean decoupled) { context.put(DECOUPLED_RESPONSE, decoupled ? Boolean.TRUE : Boolean.FALSE); context.setScope(DECOUPLED_RESPONSE, MessageContext.Scope.HANDLER); }
@SuppressWarnings("unchecked") public void putAll(Map<? extends String, ? extends Object> arg0) { context.putAll(arg0); if (arg0 instanceof MessageContext) { Iterator<String> iter = ((MessageContext)arg0).keySet().iterator(); while (iter.hasNext()) { String obj = iter.next(); context.setScope(obj, ((MessageContext)arg0).getScope(obj)); } } }
public static void storeRMProperties(MessageContext context, RMProperties rmps, boolean outbound) { String key = getRMPropertiesKey(outbound); context.put(key, rmps); context.setScope(key, MessageContext.Scope.HANDLER); }
public Object put(String key, Object value) { if (context.containsKey(key) && context.getScope(key) == Scope.HANDLER) { throw new IllegalArgumentException( "Attempt to set property with scope HANDLER in provider context."); } Object o = context.put(key, value); context.setScope(key, Scope.APPLICATION); return o; }
/** * Store correlation ID in the context * * @param id the correlation ID * @param isOutbound true if message is outbound * @param context the message context */ protected static void storeCorrelationID(String id, boolean isOutbound, MessageContext context) { context.put(getCorrelationIDProperty(isOutbound), id); context.setScope(getCorrelationIDProperty(isOutbound), MessageContext.Scope.APPLICATION); }
/** * Get the arjuna context from the message context. * @param messageContext The message context. * @return The arjuna context. */ public static ArjunaContext getContext(final MessageContext messageContext) { final ArjunaContext current = (ArjunaContext)messageContext.get(ARJUNAWS_CONTEXT_PROPERTY) ; if (current != null) { return current ; } final ArjunaContext newContext = new ArjunaContext() ; messageContext.put(ARJUNAWS_CONTEXT_PROPERTY, newContext) ; messageContext.setScope(ARJUNAWS_CONTEXT_PROPERTY, MessageContext.Scope.APPLICATION); return newContext ; } }
/** * Get the arjuna context from the message context. * @param messageContext The message context. * @return The arjuna context. */ public static ArjunaContext getContext(final MessageContext messageContext) { final ArjunaContext current = (ArjunaContext)messageContext.get(ARJUNAWS_CONTEXT_PROPERTY) ; if (current != null) { return current ; } final ArjunaContext newContext = new ArjunaContext() ; messageContext.put(ARJUNAWS_CONTEXT_PROPERTY, newContext) ; messageContext.setScope(ARJUNAWS_CONTEXT_PROPERTY, MessageContext.Scope.APPLICATION); return newContext ; } }
protected List<String> getHandlerInfoList(MessageContext ctx) { List<String> handlerInfoList = null; if (ctx.containsKey("handler.info")) { handlerInfoList = CastUtils.cast((List<?>)ctx.get("handler.info")); } else { handlerInfoList = new ArrayList<>(); ctx.put("handler.info", handlerInfoList); ctx.setScope("handler.info", MessageContext.Scope.APPLICATION); } return handlerInfoList; }