private void setMessageOutboundProperty(MessageContext context) { context.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, this.outbound); if (logicalMessageContext != null) { logicalMessageContext.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, this.outbound); } if (protocolMessageContext != null) { protocolMessageContext.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, this.outbound); } }
public boolean handleMessage(final MessageContext context) { context.put("my-key", myCustomObject); // do whatever else your interceptor does }
private void setMessageOutboundProperty(MessageContext context) { context.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, this.outbound); if (logicalMessageContext != null) { logicalMessageContext.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, this.outbound); } if (protocolMessageContext != null) { protocolMessageContext.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, this.outbound); } }
/** * 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); }
public boolean invokeProtocolHandlers(boolean requestor, MessageContext bindingContext) { bindingContext.put(ObjectMessageContext.REQUESTOR_ROLE_PROPERTY, requestor); bindingContext.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, isOutbound()); return invokeHandlerChain(protocolHandlers, bindingContext); }
/** * 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); }
private void changeMessageDirection(MessageContext context) { outbound = !outbound; setMessageOutboundProperty(context); context.put(ObjectMessageContext.MESSAGE_INPUT, Boolean.TRUE); }
/** * 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); }
/** * 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); }
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; }
public OutputStreamMessageContext rebase(MessageContext context, EndpointReferenceType decoupledResponseEndpoint) throws IOException { OutputStreamMessageContext outputContext = null; HttpRequest request = (HttpRequest)context.get(HTTPServerInputStreamContext.HTTP_REQUEST); HttpResponse response = (HttpResponse)context.get(HTTPServerInputStreamContext.HTTP_RESPONSE); if (response != null) { outputContext = new HTTPServerRebasedOutputStreamContext(context, request, response); context.put(HTTPServerInputStreamContext.HTTP_RESPONSE, decoupledResponseEndpoint); } return outputContext; }
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; }