本文整理了Java中org.apache.activemq.broker.Broker.getDestinations()
方法的一些代码示例,展示了Broker.getDestinations()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Broker.getDestinations()
方法的具体详情如下:
包路径:org.apache.activemq.broker.Broker
类名称:Broker
方法名:getDestinations
暂无
代码示例来源:origin: apache/activemq
@Override
public Set<Destination> getDestinations(ActiveMQDestination destination) {
return getNext().getDestinations(destination);
}
代码示例来源:origin: apache/activemq
@Override
public ActiveMQDestination[] getDestinations() throws Exception {
return getNext().getDestinations();
}
代码示例来源:origin: apache/activemq
/**
* Retrieve a set of all Destinations be used by the Broker
* @return all Destinations
*/
public Set<ActiveMQDestination> getDestinations(){
Set<ActiveMQDestination> result;
try {
ActiveMQDestination[] destinations = brokerService.getBroker().getDestinations();
result = new HashSet<ActiveMQDestination>();
Collections.addAll(result, destinations);
}catch (Exception e){
result = Collections.emptySet();
}
return result;
}
代码示例来源:origin: apache/activemq
public static boolean isPrioritizedMessageSubscriber(Broker broker,Subscription sub) {
boolean result = false;
Set<Destination> destinations = broker.getDestinations(sub.getActiveMQDestination());
if (destinations != null) {
for (Destination dest:destinations) {
if (dest.isPrioritizedMessages()) {
result = true;
break;
}
}
}
return result;
}
代码示例来源:origin: apache/activemq
@Override
public void start() throws Exception {
super.start();
if (location == null) {
location = new File(getBrokerService().getBrokerDataDirectory(), "destinations");
}
importDestinations();
destinations.addAll(Arrays.asList(getBrokerService().getBroker().getDestinations()));
}
代码示例来源:origin: apache/activemq
/**
* Sends a message to the given destination which may be a wildcard
*
* @param context broker context
* @param message message to send
* @param destination possibly wildcard destination to send the message to
* @throws Exception on error
*/
protected void send(ProducerBrokerExchange context, Message message, ActiveMQDestination destination) throws Exception {
Broker broker = context.getConnectionContext().getBroker();
Set<Destination> destinations = broker.getDestinations(destination);
for (Destination dest : destinations) {
dest.send(context, message.copy());
}
}
代码示例来源:origin: apache/activemq
@Override
protected void send(final ProducerBrokerExchange context, final Message message, ActiveMQDestination destination) throws Exception {
final Broker broker = context.getConnectionContext().getBroker();
final Set<Destination> destinations = broker.getDestinations(destination);
final int numDestinations = destinations.size();
代码示例来源:origin: apache/activemq
Set<Destination> destsToPause = regionBroker.getDestinations(dest);
try {
for (Destination d: destsToPause) {
ActiveMQDestination originalDestination = m.getMessage().getOriginalDestination();
if (originalDestination != null) {
for (Destination destination : regionBroker.getDestinations(originalDestination)) {
DeadLetterStrategy strategy = destination.getDeadLetterStrategy();
strategy.rollback(m.getMessage());
代码示例来源:origin: org.apache.activemq/activemq-all
@Override
public ActiveMQDestination[] getDestinations() throws Exception {
return getNext().getDestinations();
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
@Override
public Set<Destination> getDestinations(ActiveMQDestination destination) {
return getNext().getDestinations(destination);
}
代码示例来源:origin: org.apache.activemq/activemq-broker
@Override
public Set<Destination> getDestinations(ActiveMQDestination destination) {
return getNext().getDestinations(destination);
}
代码示例来源:origin: org.apache.activemq/activemq-all
@Override
public Set<Destination> getDestinations(ActiveMQDestination destination) {
return getNext().getDestinations(destination);
}
代码示例来源:origin: org.apache.activemq/activemq-broker
/**
* Retrieve a set of all Destinations be used by the Broker
* @return all Destinations
*/
public Set<ActiveMQDestination> getDestinations(){
Set<ActiveMQDestination> result;
try {
ActiveMQDestination[] destinations = brokerService.getBroker().getDestinations();
result = new HashSet<ActiveMQDestination>();
Collections.addAll(result, destinations);
}catch (Exception e){
result = Collections.emptySet();
}
return result;
}
代码示例来源:origin: org.apache.activemq/activemq-broker
@Override
public ActiveMQDestination[] getDestinations() throws Exception {
return getNext().getDestinations();
}
代码示例来源:origin: org.apache.activemq/activemq-broker
public static boolean isPrioritizedMessageSubscriber(Broker broker,Subscription sub) {
boolean result = false;
Set<Destination> destinations = broker.getDestinations(sub.getActiveMQDestination());
if (destinations != null) {
for (Destination dest:destinations) {
if (dest.isPrioritizedMessages()) {
result = true;
break;
}
}
}
return result;
}
代码示例来源:origin: org.apache.activemq/activemq-all
@Override
public void start() throws Exception {
super.start();
if (location == null) {
location = new File(getBrokerService().getBrokerDataDirectory(), "destinations");
}
importDestinations();
destinations.addAll(Arrays.asList(getBrokerService().getBroker().getDestinations()));
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
@Override
public void start() throws Exception {
super.start();
if (location == null) {
location = new File(getBrokerService().getBrokerDataDirectory(), "destinations");
}
importDestinations();
destinations.addAll(Arrays.asList(getBrokerService().getBroker().getDestinations()));
}
代码示例来源:origin: org.apache.activemq/activemq-broker
@Override
public void start() throws Exception {
super.start();
if (location == null) {
location = new File(getBrokerService().getBrokerDataDirectory(), "destinations");
}
importDestinations();
destinations.addAll(Arrays.asList(getBrokerService().getBroker().getDestinations()));
}
代码示例来源:origin: org.apache.activemq/activemq-broker
/**
* Sends a message to the given destination which may be a wildcard
*
* @param context broker context
* @param message message to send
* @param destination possibly wildcard destination to send the message to
* @throws Exception on error
*/
protected void send(ProducerBrokerExchange context, Message message, ActiveMQDestination destination) throws Exception {
Broker broker = context.getConnectionContext().getBroker();
Set<Destination> destinations = broker.getDestinations(destination);
for (Destination dest : destinations) {
dest.send(context, message.copy());
}
}
代码示例来源:origin: pierre/meteo
public void create(Broker broker, ConnectionContext context, ActiveMQDestination destination) throws Exception {
if (destination.isQueue() && destination.isPattern() && broker.getDestinations(destination).isEmpty()) {
DestinationFilter filter = DestinationFilter.parseFilter(new ActiveMQQueue(prefix + DestinationFilter.ANY_DESCENDENT));
if (filter.matches(destination)) {
broker.addDestination(context, destination, false);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!