本文整理了Java中org.apache.activemq.broker.Broker.removeProducer()
方法的一些代码示例,展示了Broker.removeProducer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Broker.removeProducer()
方法的具体详情如下:
包路径:org.apache.activemq.broker.Broker
类名称:Broker
方法名:removeProducer
[英]Removes a producer.
[中]删除生产者。
代码示例来源:origin: apache/activemq
@Override
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
next.removeProducer(context, info);
Broker brokers[] = getListeners();
for (int i = 0; i < brokers.length; i++) {
brokers[i].removeProducer(context, info);
}
}
代码示例来源:origin: apache/activemq
@Override
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
getNext().removeProducer(context, info);
}
代码示例来源:origin: apache/activemq
/**
* A producer may de-register from sending to multiple destinations via a
* composite destination.
*/
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
// The destination may be null.
ActiveMQDestination destination = info.getDestination();
if (destination != null && destination.isComposite()) {
ActiveMQDestination[] destinations = destination.getCompositeDestinations();
for (int i = 0; i < destinations.length; i++) {
ProducerInfo copy = info.copy();
copy.setDestination(destinations[i]);
next.removeProducer(context, copy);
}
} else {
next.removeProducer(context, info);
}
}
代码示例来源:origin: apache/activemq
@Override
public Response processRemoveProducer(ProducerId id) throws Exception {
SessionId sessionId = id.getParentId();
ConnectionId connectionId = sessionId.getParentId();
TransportConnectionState cs = lookupConnectionState(connectionId);
SessionState ss = cs.getSessionState(sessionId);
if (ss == null) {
throw new IllegalStateException("Cannot remove a producer from a session that had not been registered: "
+ sessionId);
}
ProducerState ps = ss.removeProducer(id);
if (ps == null) {
throw new IllegalStateException("Cannot remove a producer that had not been registered: " + id);
}
removeProducerBrokerExchange(id);
broker.removeProducer(cs.getContext(), ps.getInfo());
return null;
}
代码示例来源:origin: apache/activemq
ss.addProducer(info);
} catch (IllegalStateException e) {
broker.removeProducer(cs.getContext(), info);
代码示例来源:origin: pierre/meteo
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
next.removeProducer(context, info);
}
代码示例来源:origin: org.apache.activemq/activemq-broker
@Override
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
next.removeProducer(context, info);
Broker brokers[] = getListeners();
for (int i = 0; i < brokers.length; i++) {
brokers[i].removeProducer(context, info);
}
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
@Override
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
next.removeProducer(context, info);
Broker brokers[] = getListeners();
for (int i = 0; i < brokers.length; i++) {
brokers[i].removeProducer(context, info);
}
}
代码示例来源:origin: org.apache.activemq/activemq-all
@Override
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
next.removeProducer(context, info);
Broker brokers[] = getListeners();
for (int i = 0; i < brokers.length; i++) {
brokers[i].removeProducer(context, info);
}
}
代码示例来源:origin: pierre/meteo
@Override
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
next.removeProducer(context, info);
Broker brokers[] = getListeners();
for (int i = 0; i < brokers.length; i++) {
brokers[i].removeProducer(context, info);
}
}
代码示例来源:origin: org.apache.activemq/activemq-broker
@Override
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
getNext().removeProducer(context, info);
}
代码示例来源:origin: org.apache.activemq/activemq-all
@Override
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
getNext().removeProducer(context, info);
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
@Override
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
getNext().removeProducer(context, info);
}
代码示例来源:origin: pierre/meteo
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
getNext().removeProducer(context, info);
}
代码示例来源:origin: org.apache.activemq/activemq-broker
/**
* A producer may de-register from sending to multiple destinations via a
* composite destination.
*/
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
// The destination may be null.
ActiveMQDestination destination = info.getDestination();
if (destination != null && destination.isComposite()) {
ActiveMQDestination[] destinations = destination.getCompositeDestinations();
for (int i = 0; i < destinations.length; i++) {
ProducerInfo copy = info.copy();
copy.setDestination(destinations[i]);
next.removeProducer(context, copy);
}
} else {
next.removeProducer(context, info);
}
}
代码示例来源:origin: org.apache.activemq/activemq-all
/**
* A producer may de-register from sending to multiple destinations via a
* composite destination.
*/
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
// The destination may be null.
ActiveMQDestination destination = info.getDestination();
if (destination != null && destination.isComposite()) {
ActiveMQDestination[] destinations = destination.getCompositeDestinations();
for (int i = 0; i < destinations.length; i++) {
ProducerInfo copy = info.copy();
copy.setDestination(destinations[i]);
next.removeProducer(context, copy);
}
} else {
next.removeProducer(context, info);
}
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
/**
* A producer may de-register from sending to multiple destinations via a
* composite destination.
*/
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
// The destination may be null.
ActiveMQDestination destination = info.getDestination();
if (destination != null && destination.isComposite()) {
ActiveMQDestination[] destinations = destination.getCompositeDestinations();
for (int i = 0; i < destinations.length; i++) {
ProducerInfo copy = info.copy();
copy.setDestination(destinations[i]);
next.removeProducer(context, copy);
}
} else {
next.removeProducer(context, info);
}
}
代码示例来源:origin: org.apache.activemq/activemq-broker
@Override
public Response processRemoveProducer(ProducerId id) throws Exception {
SessionId sessionId = id.getParentId();
ConnectionId connectionId = sessionId.getParentId();
TransportConnectionState cs = lookupConnectionState(connectionId);
SessionState ss = cs.getSessionState(sessionId);
if (ss == null) {
throw new IllegalStateException("Cannot remove a producer from a session that had not been registered: "
+ sessionId);
}
ProducerState ps = ss.removeProducer(id);
if (ps == null) {
throw new IllegalStateException("Cannot remove a producer that had not been registered: " + id);
}
removeProducerBrokerExchange(id);
broker.removeProducer(cs.getContext(), ps.getInfo());
return null;
}
代码示例来源:origin: pierre/meteo
public Response processRemoveProducer(ProducerId id) throws Exception {
SessionId sessionId = id.getParentId();
ConnectionId connectionId = sessionId.getParentId();
TransportConnectionState cs = lookupConnectionState(connectionId);
SessionState ss = cs.getSessionState(sessionId);
if (ss == null) {
throw new IllegalStateException("Cannot remove a producer from a session that had not been registered: "
+ sessionId);
}
ProducerState ps = ss.removeProducer(id);
if (ps == null) {
throw new IllegalStateException("Cannot remove a producer that had not been registered: " + id);
}
removeProducerBrokerExchange(id);
broker.removeProducer(cs.getContext(), ps.getInfo());
return null;
}
代码示例来源:origin: org.apache.activemq/activemq-all
@Override
public Response processRemoveProducer(ProducerId id) throws Exception {
SessionId sessionId = id.getParentId();
ConnectionId connectionId = sessionId.getParentId();
TransportConnectionState cs = lookupConnectionState(connectionId);
SessionState ss = cs.getSessionState(sessionId);
if (ss == null) {
throw new IllegalStateException("Cannot remove a producer from a session that had not been registered: "
+ sessionId);
}
ProducerState ps = ss.removeProducer(id);
if (ps == null) {
throw new IllegalStateException("Cannot remove a producer that had not been registered: " + id);
}
removeProducerBrokerExchange(id);
broker.removeProducer(cs.getContext(), ps.getInfo());
return null;
}
内容来源于网络,如有侵权,请联系作者删除!