private void removeMessageStore(PersistenceAdapter adapter, ActiveMQDestination destination) { stopAdapter(adapter, destination.toString()); File adapterDir = adapter.getDirectory(); if (adapterDir != null) { if (IOHelper.deleteFile(adapterDir)) { if (LOG.isTraceEnabled()) { LOG.info("deleted per destination adapter directory for: " + destination); } } else { if (LOG.isTraceEnabled()) { LOG.info("failed to deleted per destination adapter directory for: " + destination); } } } }
@Override public Object evaluate(Message message) { if (message.getReplyTo() == null) { return null; } return message.getReplyTo().toString(); } });
@Override public Object evaluate(Message message) { ActiveMQDestination dest = message.getOriginalDestination(); if (dest == null) { dest = message.getDestination(); } if (dest == null) { return null; } return dest.toString(); } });
try { sb.append(destination.toString() + URISupport.applyParameters( new URI(""), destination.getOptions())); } catch (URISyntaxException e1) {
/** * @param brokerService * @param store * @param destination * @param parentStats * @throws Exception */ public BaseDestination(BrokerService brokerService, MessageStore store, ActiveMQDestination destination, DestinationStatistics parentStats) throws Exception { this.brokerService = brokerService; this.broker = brokerService.getBroker(); this.store = store; this.destination = destination; // let's copy the enabled property from the parent DestinationStatistics this.destinationStatistics.setEnabled(parentStats.isEnabled()); this.destinationStatistics.setParent(parentStats); this.systemUsage = new SystemUsage(brokerService.getProducerSystemUsage(), destination.toString()); this.memoryUsage = this.systemUsage.getMemoryUsage(); this.memoryUsage.setUsagePortion(1.0f); this.regionBroker = brokerService.getRegionBroker(); this.scheduler = brokerService.getBroker().getScheduler(); }
statsMessage.setString("brokerName", regionBroker.getBrokerName()); statsMessage.setString("brokerId", regionBroker.getBrokerId().toString()); statsMessage.setString("destinationName", dest.getActiveMQDestination().toString()); statsMessage.setLong("size", stats.getMessages().getCount()); statsMessage.setLong("enqueueCount", stats.getEnqueues().getCount());
public String getDestinationName() { return (destination != null) ? destination.toString() : null; }
public void setBrokerOverview(BrokerOverview brokerOverview) { this.brokerOverview = brokerOverview; if (brokerOverview != null) { synchronized (destinations) { destinations.clear(); for (ActiveMQDestination destination : brokerOverview.getQueueOverviews().keySet()) { destinations.add(destination.toString()); } for (ActiveMQDestination destination : brokerOverview.getTopicOverviews().keySet()) { destinations.add(destination.toString()); } } } }
@Override public Object evaluate(Message message) { if (message.getReplyTo() == null) { return null; } return message.getReplyTo().toString(); } });
@Override public Object evaluate(Message message) { ActiveMQDestination dest = message.getOriginalDestination(); if (dest == null) { dest = message.getDestination(); } if (dest == null) { return null; } return dest.toString(); } });
@Override public Object evaluate(Message message) { ActiveMQDestination dest = message.getOriginalDestination(); if (dest == null) { dest = message.getDestination(); } if (dest == null) { return null; } return dest.toString(); } });
@Override public Object evaluate(Message message) { if (message.getReplyTo() == null) { return null; } return message.getReplyTo().toString(); } });
@Override public Object evaluate(Message message) { if (message.getReplyTo() == null) { return null; } return message.getReplyTo().toString(); } });
@Override public Object evaluate(Message message) { ActiveMQDestination dest = message.getOriginalDestination(); if (dest == null) { dest = message.getDestination(); } if (dest == null) { return null; } return dest.toString(); } });
public Object evaluate(Message message) { if (message.getReplyTo() == null) { return null; } return message.getReplyTo().toString(); } });
public Object evaluate(Message message) { ActiveMQDestination dest = message.getOriginalDestination(); if (dest == null) { dest = message.getDestination(); } if (dest == null) { return null; } return dest.toString(); } });
private String getDestName(MessageReference message) { return message.getMessage().getDestination().toString(); }
/** * Assert that the specified destination has the expected message count. * * @param broker the EmbeddedActiveMQBroker to check * @param destinationName the name of the destination to check. * @param expected the expected number of messages */ public static void assertMessageCount(EmbeddedActiveMQBroker broker, String destinationName, long expected) { ActiveMQDestination destination = ActiveMQDestination.createDestination(destinationName, ActiveMQDestination.QUEUE_TYPE); assertMessageCount( String.format("Message Count for destination %s in broker %s did not match expected value", destination.toString(), broker.getBrokerName()), broker, destinationName, expected); }