@Override public boolean evaluate(ConnectionContext context, MessageReference r) throws JMSException { MessageEvaluationContext messageEvaluationContext = context.getMessageEvaluationContext(); messageEvaluationContext.setMessageReference(r); if (messageEvaluationContext.getDestination() == null) { messageEvaluationContext.setDestination(getActiveMQDestination()); } return selectorExpression.matches(messageEvaluationContext); } };
public ConnectionContext createConnectionContext() { ConnectionContext answer = new ConnectionContext(); answer.setBroker(this.broker); answer.getMessageEvaluationContext().setDestination(getActiveMQDestination()); answer.setSecurityContext(SecurityContext.BROKER_SECURITY_CONTEXT); return answer; }
@Override public boolean addRecoveredMessage(ConnectionContext context, MessageReference message) throws Exception { boolean result = false; MessageEvaluationContext msgContext = context.getMessageEvaluationContext(); try { Destination regionDestination = (Destination) message.getRegionDestination(); msgContext.setDestination(regionDestination.getActiveMQDestination()); msgContext.setMessageReference(message); result = matches(message, msgContext); if (result) { doAddRecoveredMessage(message); } } finally { msgContext.clear(); } return result; }
msgContext = context.getMessageEvaluationContext(); msgContext.setDestination(destination); msgContext.setMessageReference(message);
@Override public boolean evaluate(ConnectionContext context, MessageReference r) throws JMSException { MessageEvaluationContext messageEvaluationContext = context.getMessageEvaluationContext(); messageEvaluationContext.setMessageReference(r); if (messageEvaluationContext.getDestination() == null) { messageEvaluationContext.setDestination(getActiveMQDestination()); } return selectorExpression.matches(messageEvaluationContext); } };
@Override public boolean evaluate(ConnectionContext context, MessageReference r) throws JMSException { MessageEvaluationContext messageEvaluationContext = context.getMessageEvaluationContext(); messageEvaluationContext.setMessageReference(r); if (messageEvaluationContext.getDestination() == null) { messageEvaluationContext.setDestination(getActiveMQDestination()); } return selectorExpression.matches(messageEvaluationContext); } };
public boolean evaluate(ConnectionContext context, MessageReference r) throws JMSException { MessageEvaluationContext messageEvaluationContext = context.getMessageEvaluationContext(); messageEvaluationContext.setMessageReference(r); if (messageEvaluationContext.getDestination() == null) { messageEvaluationContext.setDestination(getActiveMQDestination()); } return selectorExpression.matches(messageEvaluationContext); } };
@Override public boolean evaluate(ConnectionContext context, MessageReference r) throws JMSException { MessageEvaluationContext messageEvaluationContext = context.getMessageEvaluationContext(); messageEvaluationContext.setMessageReference(r); if (messageEvaluationContext.getDestination() == null) { messageEvaluationContext.setDestination(getActiveMQDestination()); } return selectorExpression.matches(messageEvaluationContext); } };
public ConnectionContext createConnectionContext() { ConnectionContext answer = new ConnectionContext(); answer.setBroker(this.broker); answer.getMessageEvaluationContext().setDestination(getActiveMQDestination()); answer.setSecurityContext(SecurityContext.BROKER_SECURITY_CONTEXT); return answer; }
public ConnectionContext createConnectionContext() { ConnectionContext answer = new ConnectionContext(); answer.setBroker(this.broker); answer.getMessageEvaluationContext().setDestination(getActiveMQDestination()); answer.setSecurityContext(SecurityContext.BROKER_SECURITY_CONTEXT); return answer; }
public ConnectionContext createConnectionContext() { ConnectionContext answer = new ConnectionContext(); answer.setBroker(this.broker); answer.getMessageEvaluationContext().setDestination(getActiveMQDestination()); answer.setSecurityContext(SecurityContext.BROKER_SECURITY_CONTEXT); return answer; }
protected ConnectionContext createConnectionContext() { ConnectionContext answer = new ConnectionContext(new NonCachedMessageEvaluationContext()); answer.setBroker(this.broker); answer.getMessageEvaluationContext().setDestination(getActiveMQDestination()); answer.setSecurityContext(SecurityContext.BROKER_SECURITY_CONTEXT); return answer; }
@Override public boolean addRecoveredMessage(ConnectionContext context, MessageReference message) throws Exception { boolean result = false; MessageEvaluationContext msgContext = context.getMessageEvaluationContext(); try { Destination regionDestination = (Destination) message.getRegionDestination(); msgContext.setDestination(regionDestination.getActiveMQDestination()); msgContext.setMessageReference(message); result = matches(message, msgContext); if (result) { doAddRecoveredMessage(message); } } finally { msgContext.clear(); } return result; }
@Override public boolean addRecoveredMessage(ConnectionContext context, MessageReference message) throws Exception { boolean result = false; MessageEvaluationContext msgContext = context.getMessageEvaluationContext(); try { Destination regionDestination = (Destination) message.getRegionDestination(); msgContext.setDestination(regionDestination.getActiveMQDestination()); msgContext.setMessageReference(message); result = matches(message, msgContext); if (result) { doAddRecoveredMessage(message); } } finally { msgContext.clear(); } return result; }
public boolean addRecoveredMessage(ConnectionContext context, MessageReference message) throws Exception { boolean result = false; MessageEvaluationContext msgContext = context.getMessageEvaluationContext(); try { msgContext.setDestination(message.getRegionDestination().getActiveMQDestination()); msgContext.setMessageReference(message); result = matches(message, msgContext); if (result) { doAddRecoveredMessage(message); } } finally { msgContext.clear(); } return result; }
@Override public boolean addRecoveredMessage(ConnectionContext context, MessageReference message) throws Exception { boolean result = false; MessageEvaluationContext msgContext = context.getMessageEvaluationContext(); try { Destination regionDestination = (Destination) message.getRegionDestination(); msgContext.setDestination(regionDestination.getActiveMQDestination()); msgContext.setMessageReference(message); result = matches(message, msgContext); if (result) { doAddRecoveredMessage(message); } } finally { msgContext.clear(); } return result; }
msgContext = context.getMessageEvaluationContext(); msgContext.setDestination(destination); msgContext.setMessageReference(message);
msgContext = context.getMessageEvaluationContext(); msgContext.setDestination(destination); msgContext.setMessageReference(message);
msgContext = context.getMessageEvaluationContext(); msgContext.setDestination(destination); msgContext.setMessageReference(message);
protected void dispatch(final ConnectionContext context, Message message) throws Exception { // AMQ-2586: Better to leave this stat at zero than to give the user // misleading metrics. // destinationStatistics.getMessages().increment(); destinationStatistics.getEnqueues().increment(); dispatchValve.increment(); MessageEvaluationContext msgContext = null; try { if (!subscriptionRecoveryPolicy.add(context, message)) { return; } synchronized (consumers) { if (consumers.isEmpty()) { onMessageWithNoConsumers(context, message); return; } } msgContext = context.getMessageEvaluationContext(); msgContext.setDestination(destination); msgContext.setMessageReference(message); if (!dispatchPolicy.dispatch(message, msgContext, consumers)) { onMessageWithNoConsumers(context, message); } } finally { dispatchValve.decrement(); if (msgContext != null) { msgContext.clear(); } } }