org.apache.qpid.proton.amqp.messaging.Source.setDefaultOutcome()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中org.apache.qpid.proton.amqp.messaging.Source.setDefaultOutcome()方法的一些代码示例,展示了Source.setDefaultOutcome()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Source.setDefaultOutcome()方法的具体详情如下:
包路径:org.apache.qpid.proton.amqp.messaging.Source
类名称:Source
方法名:setDefaultOutcome

Source.setDefaultOutcome介绍

暂无

代码示例

代码示例来源:origin: org.apache.qpid/proton-j-impl

o.setDefaultOutcome( (Outcome) l.get( 8 ) );
case 3:
  o.setFilter( (Map) l.get( 7 ) );

代码示例来源:origin: org.apache.qpid/proton

o.setDefaultOutcome( (Outcome) l.get( 8 ) );
case 3:
  o.setFilter( (Map) l.get( 7 ) );

代码示例来源:origin: org.apache.qpid/proton-j

o.setDefaultOutcome( (Outcome) l.get( 8 ) );
case 3:
  o.setFilter( (Map) l.get( 7 ) );

代码示例来源:origin: com.microsoft.azure.iot/proton-j-azure-iot

o.setDefaultOutcome( (Outcome) l.get( 8 ) );
case 3:
  o.setFilter( (Map) l.get( 7 ) );

代码示例来源:origin: apache/activemq-artemis

protected void configureSource(Source source) {
 Map<Symbol, DescribedType> filters = new HashMap<>();
 Symbol[] outcomes = new Symbol[] {Accepted.DESCRIPTOR_SYMBOL, Rejected.DESCRIPTOR_SYMBOL, Released.DESCRIPTOR_SYMBOL, Modified.DESCRIPTOR_SYMBOL};
 if (getSubscriptionName() != null && !getSubscriptionName().isEmpty()) {
   source.setExpiryPolicy(TerminusExpiryPolicy.NEVER);
   source.setDurable(TerminusDurability.UNSETTLED_STATE);
   source.setDistributionMode(COPY);
 } else {
   source.setDurable(TerminusDurability.NONE);
   source.setExpiryPolicy(TerminusExpiryPolicy.LINK_DETACH);
 }
 source.setOutcomes(outcomes);
 Modified modified = new Modified();
 modified.setDeliveryFailed(true);
 modified.setUndeliverableHere(false);
 source.setDefaultOutcome(modified);
 if (isNoLocal()) {
   filters.put(NO_LOCAL_NAME, AmqpNoLocalFilter.NO_LOCAL);
 }
 if (getSelector() != null && !getSelector().trim().equals("")) {
   filters.put(JMS_SELECTOR_NAME, new AmqpJmsSelectorFilter(getSelector()));
 }
 if (!filters.isEmpty()) {
   source.setFilter(filters);
 }
}

代码示例来源:origin: org.apache.qpid/qpid-jms-client

source.setDefaultOutcome(MODIFIED_FAILED);

代码示例来源:origin: apache/qpid-jms

source.setDefaultOutcome(MODIFIED_FAILED);

代码示例来源: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;
}

相关文章