@Override public CompositeData[] browse(String selector) throws OpenDataException, InvalidSelectorException { Message[] messages = destination.browse(); ArrayList<CompositeData> c = new ArrayList<CompositeData>(); NonCachedMessageEvaluationContext ctx = new NonCachedMessageEvaluationContext(); ctx.setDestination(destination.getActiveMQDestination()); BooleanExpression selectorExpression = selector == null ? null : SelectorParser.parse(selector); for (int i = 0; i < messages.length; i++) { try { if (selectorExpression == null) { c.add(OpenTypeSupport.convert(messages[i])); } else { ctx.setMessageReference(messages[i]); if (selectorExpression.matches(ctx)) { c.add(OpenTypeSupport.convert(messages[i])); } } } catch (Throwable e) { LOG.warn("exception browsing destination", e); } } CompositeData rc[] = new CompositeData[c.size()]; c.toArray(rc); return rc; }
/** * Browses the current destination with the given selector returning a list * of messages */ @Override public List<Object> browseMessages(String selector) throws InvalidSelectorException { Message[] messages = destination.browse(); ArrayList<Object> answer = new ArrayList<Object>(); NonCachedMessageEvaluationContext ctx = new NonCachedMessageEvaluationContext(); ctx.setDestination(destination.getActiveMQDestination()); BooleanExpression selectorExpression = selector == null ? null : SelectorParser.parse(selector); for (int i = 0; i < messages.length; i++) { try { Message message = messages[i]; message.setReadOnlyBody(true); if (selectorExpression == null) { answer.add(message); } else { ctx.setMessageReference(message); if (selectorExpression.matches(ctx)) { answer.add(message); } } } catch (Throwable e) { LOG.warn("exception browsing destination", e); } } return answer; }
private boolean suppressMessageDispatch(MessageDispatch md, DemandSubscription sub) throws Exception { boolean suppress = false; // for durable subs, suppression via filter leaves dangling acks so we // need to check here and allow the ack irrespective if (sub.getLocalInfo().isDurable()) { NonCachedMessageEvaluationContext messageEvalContext = new NonCachedMessageEvaluationContext(); messageEvalContext.setMessageReference(md.getMessage()); messageEvalContext.setDestination(md.getDestination()); suppress = !sub.getNetworkBridgeFilter().matches(messageEvalContext); } return suppress; }
@Override public TabularData browseAsTable(String selector) throws OpenDataException, InvalidSelectorException { OpenTypeFactory factory = OpenTypeSupport.getFactory(ActiveMQMessage.class); Message[] messages = destination.browse(); CompositeType ct = factory.getCompositeType(); TabularType tt = new TabularType("MessageList", "MessageList", ct, new String[] { "JMSMessageID" }); TabularDataSupport rc = new TabularDataSupport(tt); NonCachedMessageEvaluationContext ctx = new NonCachedMessageEvaluationContext(); ctx.setDestination(destination.getActiveMQDestination()); BooleanExpression selectorExpression = selector == null ? null : SelectorParser.parse(selector); for (int i = 0; i < messages.length; i++) { try { if (selectorExpression == null) { rc.put(new CompositeDataSupport(ct, factory.getFields(messages[i]))); } else { ctx.setMessageReference(messages[i]); if (selectorExpression.matches(ctx)) { rc.put(new CompositeDataSupport(ct, factory.getFields(messages[i]))); } } } catch (Throwable e) { LOG.warn("exception browsing destination", e); } } return rc; }
@Override public CompositeData[] browse(String selector) throws OpenDataException, InvalidSelectorException { Message[] messages = destination.browse(); ArrayList<CompositeData> c = new ArrayList<CompositeData>(); NonCachedMessageEvaluationContext ctx = new NonCachedMessageEvaluationContext(); ctx.setDestination(destination.getActiveMQDestination()); BooleanExpression selectorExpression = selector == null ? null : SelectorParser.parse(selector); for (int i = 0; i < messages.length; i++) { try { if (selectorExpression == null) { c.add(OpenTypeSupport.convert(messages[i])); } else { ctx.setMessageReference(messages[i]); if (selectorExpression.matches(ctx)) { c.add(OpenTypeSupport.convert(messages[i])); } } } catch (Throwable e) { LOG.warn("exception browsing destination", e); } } CompositeData rc[] = new CompositeData[c.size()]; c.toArray(rc); return rc; }
/** * Browses the current destination with the given selector returning a list * of messages */ @Override public List<Object> browseMessages(String selector) throws InvalidSelectorException { Message[] messages = destination.browse(); ArrayList<Object> answer = new ArrayList<Object>(); NonCachedMessageEvaluationContext ctx = new NonCachedMessageEvaluationContext(); ctx.setDestination(destination.getActiveMQDestination()); BooleanExpression selectorExpression = selector == null ? null : SelectorParser.parse(selector); for (int i = 0; i < messages.length; i++) { try { Message message = messages[i]; message.setReadOnlyBody(true); if (selectorExpression == null) { answer.add(message); } else { ctx.setMessageReference(message); if (selectorExpression.matches(ctx)) { answer.add(message); } } } catch (Throwable e) { LOG.warn("exception browsing destination", e); } } return answer; }
@Override public CompositeData[] browse(String selector) throws OpenDataException, InvalidSelectorException { Message[] messages = destination.browse(); ArrayList<CompositeData> c = new ArrayList<CompositeData>(); NonCachedMessageEvaluationContext ctx = new NonCachedMessageEvaluationContext(); ctx.setDestination(destination.getActiveMQDestination()); BooleanExpression selectorExpression = selector == null ? null : SelectorParser.parse(selector); for (int i = 0; i < messages.length; i++) { try { if (selectorExpression == null) { c.add(OpenTypeSupport.convert(messages[i])); } else { ctx.setMessageReference(messages[i]); if (selectorExpression.matches(ctx)) { c.add(OpenTypeSupport.convert(messages[i])); } } } catch (Throwable e) { LOG.warn("exception browsing destination", e); } } CompositeData rc[] = new CompositeData[c.size()]; c.toArray(rc); return rc; }
@Override public CompositeData[] browse(String selector) throws OpenDataException, InvalidSelectorException { Message[] messages = destination.browse(); ArrayList<CompositeData> c = new ArrayList<CompositeData>(); NonCachedMessageEvaluationContext ctx = new NonCachedMessageEvaluationContext(); ctx.setDestination(destination.getActiveMQDestination()); BooleanExpression selectorExpression = selector == null ? null : SelectorParser.parse(selector); for (int i = 0; i < messages.length; i++) { try { if (selectorExpression == null) { c.add(OpenTypeSupport.convert(messages[i])); } else { ctx.setMessageReference(messages[i]); if (selectorExpression.matches(ctx)) { c.add(OpenTypeSupport.convert(messages[i])); } } } catch (Throwable e) { LOG.warn("exception browsing destination", e); } } CompositeData rc[] = new CompositeData[c.size()]; c.toArray(rc); return rc; }
/** * Browses the current destination with the given selector returning a list * of messages */ @Override public List<Object> browseMessages(String selector) throws InvalidSelectorException { Message[] messages = destination.browse(); ArrayList<Object> answer = new ArrayList<Object>(); NonCachedMessageEvaluationContext ctx = new NonCachedMessageEvaluationContext(); ctx.setDestination(destination.getActiveMQDestination()); BooleanExpression selectorExpression = selector == null ? null : SelectorParser.parse(selector); for (int i = 0; i < messages.length; i++) { try { Message message = messages[i]; message.setReadOnlyBody(true); if (selectorExpression == null) { answer.add(message); } else { ctx.setMessageReference(message); if (selectorExpression.matches(ctx)) { answer.add(message); } } } catch (Throwable e) { LOG.warn("exception browsing destination", e); } } return answer; }
/** * Browses the current destination with the given selector returning a list * of messages */ @Override public List<Object> browseMessages(String selector) throws InvalidSelectorException { Message[] messages = destination.browse(); ArrayList<Object> answer = new ArrayList<Object>(); NonCachedMessageEvaluationContext ctx = new NonCachedMessageEvaluationContext(); ctx.setDestination(destination.getActiveMQDestination()); BooleanExpression selectorExpression = selector == null ? null : SelectorParser.parse(selector); for (int i = 0; i < messages.length; i++) { try { Message message = messages[i]; message.setReadOnlyBody(true); if (selectorExpression == null) { answer.add(message); } else { ctx.setMessageReference(message); if (selectorExpression.matches(ctx)) { answer.add(message); } } } catch (Throwable e) { LOG.warn("exception browsing destination", e); } } return answer; }
private boolean suppressMessageDispatch(MessageDispatch md, DemandSubscription sub) throws Exception { boolean suppress = false; // for durable subs, suppression via filter leaves dangling acks so we // need to check here and allow the ack irrespective if (sub.getLocalInfo().isDurable()) { NonCachedMessageEvaluationContext messageEvalContext = new NonCachedMessageEvaluationContext(); messageEvalContext.setMessageReference(md.getMessage()); messageEvalContext.setDestination(md.getDestination()); suppress = !sub.getNetworkBridgeFilter().matches(messageEvalContext); } return suppress; }
private boolean suppressMessageDispatch(MessageDispatch md, DemandSubscription sub) throws Exception { boolean suppress = false; // for durable subs, suppression via filter leaves dangling acks so we // need to check here and allow the ack irrespective if (sub.getLocalInfo().isDurable()) { NonCachedMessageEvaluationContext messageEvalContext = new NonCachedMessageEvaluationContext(); messageEvalContext.setMessageReference(md.getMessage()); messageEvalContext.setDestination(md.getDestination()); suppress = !sub.getNetworkBridgeFilter().matches(messageEvalContext); } return suppress; }
private boolean suppressMessageDispatch(MessageDispatch md, DemandSubscription sub) throws Exception { boolean suppress = false; // for durable subs, suppression via filter leaves dangling acks so we // need to check here and allow the ack irrespective if (sub.getLocalInfo().isDurable()) { NonCachedMessageEvaluationContext messageEvalContext = new NonCachedMessageEvaluationContext(); messageEvalContext.setMessageReference(md.getMessage()); messageEvalContext.setDestination(md.getDestination()); suppress = !sub.getNetworkBridgeFilter().matches(messageEvalContext); } return suppress; }
@Override public TabularData browseAsTable(String selector) throws OpenDataException, InvalidSelectorException { OpenTypeFactory factory = OpenTypeSupport.getFactory(ActiveMQMessage.class); Message[] messages = destination.browse(); CompositeType ct = factory.getCompositeType(); TabularType tt = new TabularType("MessageList", "MessageList", ct, new String[] { "JMSMessageID" }); TabularDataSupport rc = new TabularDataSupport(tt); NonCachedMessageEvaluationContext ctx = new NonCachedMessageEvaluationContext(); ctx.setDestination(destination.getActiveMQDestination()); BooleanExpression selectorExpression = selector == null ? null : SelectorParser.parse(selector); for (int i = 0; i < messages.length; i++) { try { if (selectorExpression == null) { rc.put(new CompositeDataSupport(ct, factory.getFields(messages[i]))); } else { ctx.setMessageReference(messages[i]); if (selectorExpression.matches(ctx)) { rc.put(new CompositeDataSupport(ct, factory.getFields(messages[i]))); } } } catch (Throwable e) { LOG.warn("exception browsing destination", e); } } return rc; }
@Override public TabularData browseAsTable(String selector) throws OpenDataException, InvalidSelectorException { OpenTypeFactory factory = OpenTypeSupport.getFactory(ActiveMQMessage.class); Message[] messages = destination.browse(); CompositeType ct = factory.getCompositeType(); TabularType tt = new TabularType("MessageList", "MessageList", ct, new String[] { "JMSMessageID" }); TabularDataSupport rc = new TabularDataSupport(tt); NonCachedMessageEvaluationContext ctx = new NonCachedMessageEvaluationContext(); ctx.setDestination(destination.getActiveMQDestination()); BooleanExpression selectorExpression = selector == null ? null : SelectorParser.parse(selector); for (int i = 0; i < messages.length; i++) { try { if (selectorExpression == null) { rc.put(new CompositeDataSupport(ct, factory.getFields(messages[i]))); } else { ctx.setMessageReference(messages[i]); if (selectorExpression.matches(ctx)) { rc.put(new CompositeDataSupport(ct, factory.getFields(messages[i]))); } } } catch (Throwable e) { LOG.warn("exception browsing destination", e); } } return rc; }
@Override public TabularData browseAsTable(String selector) throws OpenDataException, InvalidSelectorException { OpenTypeFactory factory = OpenTypeSupport.getFactory(ActiveMQMessage.class); Message[] messages = destination.browse(); CompositeType ct = factory.getCompositeType(); TabularType tt = new TabularType("MessageList", "MessageList", ct, new String[] { "JMSMessageID" }); TabularDataSupport rc = new TabularDataSupport(tt); NonCachedMessageEvaluationContext ctx = new NonCachedMessageEvaluationContext(); ctx.setDestination(destination.getActiveMQDestination()); BooleanExpression selectorExpression = selector == null ? null : SelectorParser.parse(selector); for (int i = 0; i < messages.length; i++) { try { if (selectorExpression == null) { rc.put(new CompositeDataSupport(ct, factory.getFields(messages[i]))); } else { ctx.setMessageReference(messages[i]); if (selectorExpression.matches(ctx)) { rc.put(new CompositeDataSupport(ct, factory.getFields(messages[i]))); } } } catch (Throwable e) { LOG.warn("exception browsing destination", e); } } return rc; }