本文整理了Java中org.apache.qpid.proton.amqp.messaging.Source.setDynamic()
方法的一些代码示例,展示了Source.setDynamic()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Source.setDynamic()
方法的具体详情如下:
包路径:org.apache.qpid.proton.amqp.messaging.Source
类名称:Source
方法名:setDynamic
暂无
代码示例来源:origin: org.apache.qpid/proton
case 6:
Boolean dynamic = (Boolean) l.get(4);
o.setDynamic(dynamic == null ? false : dynamic);
case 7:
UnsignedInteger timeout = (UnsignedInteger) l.get(3);
代码示例来源:origin: EnMasseProject/enmasse
private void createReceiver(Vertx vertx, String address, CompletableFuture<Void> promise, int retries) {
receiver = connection.createReceiver(address);
Source source = new Source();
source.setDynamic(true);
receiver.setSource(source);
receiver.openHandler(h -> {
if (h.succeeded()) {
context = vertx.getOrCreateContext();
replyTo = receiver.getRemoteSource().getAddress();
promise.complete(null);
} else {
if (retries > maxRetries) {
promise.completeExceptionally(h.cause());
} else {
log.info("Error creating receiver, retries = {}", retries);
vertx.setTimer(1000, id -> createReceiver(vertx, address, promise, retries + 1));
}
}
});
receiver.handler(((protonDelivery, message) -> {
try {
replies.put(message);
ProtonHelper.accepted(protonDelivery, true);
} catch (Exception e) {
ProtonHelper.rejected(protonDelivery, true);
}
}));
receiver.open();
}
代码示例来源:origin: org.apache.qpid/proton-j
case 6:
Boolean dynamic = (Boolean) l.get(4);
o.setDynamic(dynamic == null ? false : dynamic);
case 7:
UnsignedInteger timeout = (UnsignedInteger) l.get(3);
代码示例来源:origin: io.vertx/vertx-proton
source.setDynamic(true);
代码示例来源:origin: org.apache.qpid/proton-j-impl
case 6:
Boolean dynamic = (Boolean) l.get(4);
o.setDynamic(dynamic == null ? false : dynamic);
case 7:
UnsignedInteger timeout = (UnsignedInteger) l.get(3);
代码示例来源:origin: io.vertx/vertx-proton
@Override
public ProtonReceiver createReceiver(String address, ProtonLinkOptions receiverOptions) {
Receiver receiver = session.receiver(getOrCreateLinkName(receiverOptions));
Symbol[] outcomes = new Symbol[] { Accepted.DESCRIPTOR_SYMBOL, Rejected.DESCRIPTOR_SYMBOL,
Released.DESCRIPTOR_SYMBOL, Modified.DESCRIPTOR_SYMBOL };
Source source = new Source();
source.setAddress(address);
source.setOutcomes(outcomes);
source.setDefaultOutcome(Released.getInstance());
if(receiverOptions.isDynamic()) {
source.setDynamic(true);
}
Target target = new Target();
receiver.setSource(source);
receiver.setTarget(target);
ProtonReceiverImpl r = new ProtonReceiverImpl(receiver);
r.openHandler((result) -> {
LOG.trace("Receiver open completed");
});
r.closeHandler((result) -> {
if (result.succeeded()) {
LOG.trace("Receiver closed");
} else {
LOG.warn("Receiver closed with error", result.cause());
}
});
// Default to at-least-once
r.setQoS(ProtonQoS.AT_LEAST_ONCE);
return r;
}
代码示例来源:origin: com.microsoft.azure.iot/proton-j-azure-iot
case 6:
Boolean dynamic = (Boolean) l.get(4);
o.setDynamic(dynamic == null ? false : dynamic);
case 7:
UnsignedInteger timeout = (UnsignedInteger) l.get(3);
代码示例来源:origin: apache/activemq-artemis
protected Source createDynamicSource(boolean topic) {
Source source = new Source();
source.setDynamic(true);
source.setDurable(TerminusDurability.NONE);
source.setExpiryPolicy(TerminusExpiryPolicy.LINK_DETACH);
// Set the dynamic node lifetime-policy
Map<Symbol, Object> dynamicNodeProperties = new HashMap<>();
dynamicNodeProperties.put(LIFETIME_POLICY, DeleteOnClose.getInstance());
source.setDynamicNodeProperties(dynamicNodeProperties);
// Set the capability to indicate the node type being created
if (!topic) {
source.setCapabilities(TEMP_QUEUE_CAPABILITY);
} else {
source.setCapabilities(TEMP_TOPIC_CAPABILITY);
}
return source;
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
source.setAddress(destination.getQualifiedName());
source.setCapabilities(AmqpSupport.getDestinationTypeSymbol(destination));
source.setDynamic(true);
source.setDynamicNodeProperties(dynamicNodeProperties);
代码示例来源:origin: org.apache.activemq/activemq-all
source.setAddress(destination.getQualifiedName());
source.setCapabilities(AmqpSupport.getDestinationTypeSymbol(destination));
source.setDynamic(true);
source.setDynamicNodeProperties(dynamicNodeProperties);
内容来源于网络,如有侵权,请联系作者删除!