Tabnine Logo
Destination.browse
Code IndexAdd Tabnine to your IDE (free)

How to use
browse
method
in
org.apache.activemq.broker.region.Destination

Best Java code snippets using org.apache.activemq.broker.region.Destination.browse (Showing top 20 results out of 315)

origin: apache/activemq

@Override
public Message[] browse() {
  return next.browse();
}
origin: apache/activemq

protected Message[] getSubscriberMessages(SubscriptionView view) {
  ActiveMQDestination destination = getTopicDestination(view);
  if (destination != null) {
    Destination topic = getTopicRegion().getDestinationMap().get(destination);
    return topic.browse();
  } else {
    LOG.warn("can't determine topic to browse for sub:" + view);
    return new Message[]{};
  }
}
origin: apache/activemq

@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;
}
origin: apache/activemq

/**
 * 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;
}
origin: apache/activemq

@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;
}
origin: org.apache.activemq/activemq-broker

@Override
public Message[] browse() {
  return next.browse();
}
origin: org.apache.activemq/activemq-all

@Override
public Message[] browse() {
  return next.browse();
}
origin: org.apache.activemq/activemq-osgi

@Override
public Message[] browse() {
  return next.browse();
}
origin: pierre/meteo

public Message[] browse() {
  return next.browse();
}
origin: org.apache.activemq/activemq-osgi

protected Message[] getSubscriberMessages(SubscriptionView view) {
  ActiveMQDestination destination = getTopicDestination(view);
  if (destination != null) {
    Destination topic = getTopicRegion().getDestinationMap().get(destination);
    return topic.browse();
  } else {
    LOG.warn("can't determine topic to browse for sub:" + view);
    return new Message[]{};
  }
}
origin: org.apache.activemq/activemq-all

protected Message[] getSubscriberMessages(SubscriptionView view) {
  ActiveMQDestination destination = getTopicDestination(view);
  if (destination != null) {
    Destination topic = getTopicRegion().getDestinationMap().get(destination);
    return topic.browse();
  } else {
    LOG.warn("can't determine topic to browse for sub:" + view);
    return new Message[]{};
  }
}
origin: org.apache.activemq/activemq-broker

protected Message[] getSubscriberMessages(SubscriptionView view) {
  ActiveMQDestination destination = getTopicDestination(view);
  if (destination != null) {
    Destination topic = getTopicRegion().getDestinationMap().get(destination);
    return topic.browse();
  } else {
    LOG.warn("can't determine topic to browse for sub:" + view);
    return new Message[]{};
  }
}
origin: org.apache.activemq/activemq-broker

@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;
}
origin: org.apache.activemq/activemq-all

@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;
}
origin: org.apache.activemq/activemq-osgi

@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;
}
origin: org.apache.activemq/activemq-broker

/**
 * 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;
}
origin: pierre/meteo

/**
 * Browses the current destination with the given selector returning a list
 * of messages
 */
public List<Object> browseMessages(String selector) throws InvalidSelectorException {
  Message[] messages = destination.browse();
  ArrayList<Object> answer = new ArrayList<Object>();
  MessageEvaluationContext ctx = new MessageEvaluationContext();
  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];
      if (selectorExpression == null) {
        answer.add(OpenTypeSupport.convert(message));
      } else {
        ctx.setMessageReference(message);
        if (selectorExpression.matches(ctx)) {
          answer.add(message);
        }
      }
    } catch (Throwable e) {
      LOG.warn("exception browsing destination", e);
    }
  }
  return answer;
}
origin: org.apache.activemq/activemq-all

@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;
}
origin: org.apache.activemq/activemq-broker

@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;
}
origin: org.apache.activemq/activemq-osgi

@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;
}
org.apache.activemq.broker.regionDestinationbrowse

Popular methods of Destination

  • getConsumers
  • getDestinationStatistics
  • getName
  • getActiveMQDestination
  • removeSubscription
  • acknowledge
  • addProducer
  • addSubscription
  • dispose
  • fastProducer
    Called to notify a producer is too fast
  • gc
  • getBlockedProducerWarningInterval
  • gc,
  • getBlockedProducerWarningInterval,
  • getCursorMemoryHighWaterMark,
  • getDeadLetterStrategy,
  • getMaxAuditDepth,
  • getMaxBrowsePageSize,
  • getMaxPageSize,
  • getMaxProducersToAudit,
  • getMemoryUsage

Popular in Java

  • Making http post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • putExtra (Intent)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now