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

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

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

Source.setCapabilities介绍

暂无

代码示例

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

protected Source createJmsSource(boolean topic) {

   Source source = new Source();
   // Set the capability to indicate the node type being created
   if (!topic) {
     source.setCapabilities(QUEUE_CAPABILITY);
   } else {
     source.setCapabilities(TOPIC_CAPABILITY);
   }

   return source;
  }
}

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

protected Source createJmsSource(boolean topic) {

   Source source = new Source();
   // Set the capability to indicate the node type being created
   if (!topic) {
     source.setCapabilities(QUEUE_CAPABILITY);
   } else {
     source.setCapabilities(TOPIC_CAPABILITY);
   }

   return source;
  }
}

代码示例来源:origin: EnMasseProject/enmasse

@Override
public Source getSource(String address) {
  Source source = super.getSource(address);
  source.setCapabilities(Symbol.getSymbol("topic"));
  return source;
}

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

if( val0 == null || val0.getClass().isArray() )
  o.setCapabilities( (Symbol[]) val0 );
  o.setCapabilities( (Symbol) val0 );

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

if( val0 == null || val0.getClass().isArray() )
  o.setCapabilities( (Symbol[]) val0 );
  o.setCapabilities( (Symbol) val0 );

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

if( val0 == null || val0.getClass().isArray() )
  o.setCapabilities( (Symbol[]) val0 );
  o.setCapabilities( (Symbol) val0 );

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

if( val0 == null || val0.getClass().isArray() )
  o.setCapabilities( (Symbol[]) val0 );
  o.setCapabilities( (Symbol) val0 );

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

source.setCapabilities(capArray);

代码示例来源: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: apache/qpid-jms

source.setCapabilities(capArray);

代码示例来源:origin: EnMasseProject/enmasse

source.setCapabilities(topic);
source.setDurable(TerminusDurability.UNSETTLED_STATE);

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

private Source createSharedSource(TerminusDurability terminusDurability) {
 Source source = new Source();
 source.setAddress(address.toString());
 source.setCapabilities(TOPIC_CAPABILITY, SHARED);
 source.setDurable(terminusDurability);
 return source;
}

代码示例来源:origin: io.vertx/vertx-proton

source.setCapabilities(caps);

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

private Source createNonSharedSource(TerminusDurability terminusDurability) {
 Source source = new Source();
 source.setAddress(address.toString());
 source.setCapabilities(TOPIC_CAPABILITY);
 source.setDurable(terminusDurability);
 return source;
}

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

private Source createSharedGlobalSource(TerminusDurability terminusDurability) {
   Source source = new Source();
   source.setAddress(address.toString());
   source.setCapabilities(TOPIC_CAPABILITY, SHARED, GLOBAL);
   source.setDurable(terminusDurability);
   return source;
  }
}

代码示例来源:origin: org.apache.activemq/activemq-all

source.setCapabilities(AmqpSupport.getDestinationTypeSymbol(destination));
source.setDynamic(true);
source.setDynamicNodeProperties(dynamicNodeProperties);

代码示例来源:origin: org.apache.activemq/activemq-osgi

source.setCapabilities(AmqpSupport.getDestinationTypeSymbol(destination));
source.setDynamic(true);
source.setDynamicNodeProperties(dynamicNodeProperties);

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

source.setExpiryPolicy(TerminusExpiryPolicy.NEVER);
source.setDistributionMode(COPY);
source.setCapabilities(TOPIC);

代码示例来源:origin: org.apache.activemq/artemis-proton-plug

source.setExpiryPolicy(TerminusExpiryPolicy.NEVER);
source.setDistributionMode(COPY);
source.setCapabilities(TOPIC);
sender.setSource(source);

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

@Test(timeout = 60000)
public void testClientIdIsSetInSubscriptionList() throws Exception {
 server.addAddressInfo(new AddressInfo(SimpleString.toSimpleString("mytopic"), RoutingType.ANYCAST));
 AmqpClient client = createAmqpClient();
 AmqpConnection connection = addConnection(client.connect());
 connection.setContainerId("testClient");
 connection.connect();
 try {
   AmqpSession session = connection.createSession();
   Source source = new Source();
   source.setDurable(TerminusDurability.UNSETTLED_STATE);
   source.setCapabilities(Symbol.getSymbol("topic"));
   source.setAddress("mytopic");
   session.createReceiver(source, "testSub");
   SimpleString fo = new SimpleString("testClient.testSub:mytopic");
   assertNotNull(server.locateQueue(fo));
 } catch (Exception e) {
   e.printStackTrace();
 } finally {
   connection.close();
 }
}

相关文章