本文整理了Java中org.apache.qpid.proton.amqp.messaging.Source.setDurable()
方法的一些代码示例,展示了Source.setDurable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Source.setDurable()
方法的具体详情如下:
包路径:org.apache.qpid.proton.amqp.messaging.Source
类名称:Source
方法名:setDurable
暂无
代码示例来源:origin: EnMasseProject/enmasse
@Override
public Source getSource(String address) {
Source source = super.getSource(address);
source.setDurable(TerminusDurability.UNSETTLED_STATE);
return source;
}
代码示例来源:origin: org.apache.qpid/proton-j-impl
case 9:
UnsignedInteger durable = (UnsignedInteger) l.get(1);
o.setDurable(durable == null ? TerminusDurability.NONE : TerminusDurability.get(durable));
case 10:
o.setAddress( (String) l.get( 0 ) );
代码示例来源:origin: org.apache.qpid/proton
case 9:
UnsignedInteger durable = (UnsignedInteger) l.get(1);
o.setDurable(durable == null ? TerminusDurability.NONE : TerminusDurability.get(durable));
case 10:
o.setAddress( (String) l.get( 0 ) );
代码示例来源:origin: org.apache.qpid/proton-j
case 9:
UnsignedInteger durable = (UnsignedInteger) l.get(1);
o.setDurable(durable == null ? TerminusDurability.NONE : TerminusDurability.get(durable));
case 10:
o.setAddress( (String) l.get( 0 ) );
代码示例来源:origin: com.microsoft.azure.iot/proton-j-azure-iot
case 9:
UnsignedInteger durable = (UnsignedInteger) l.get(1);
o.setDurable(durable == null ? TerminusDurability.NONE : TerminusDurability.get(durable));
case 10:
o.setAddress( (String) l.get( 0 ) );
代码示例来源: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.setDurable(TerminusDurability.UNSETTLED_STATE);
source.setDistributionMode(COPY);
} else {
source.setDurable(TerminusDurability.NONE);
source.setExpiryPolicy(TerminusExpiryPolicy.LINK_DETACH);
代码示例来源:origin: apache/qpid-jms
source.setDurable(TerminusDurability.UNSETTLED_STATE);
source.setDistributionMode(COPY);
} else {
source.setDurable(TerminusDurability.NONE);
source.setExpiryPolicy(TerminusExpiryPolicy.LINK_DETACH);
代码示例来源:origin: EnMasseProject/enmasse
source.setAddress(address);
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: 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: io.vertx/vertx-proton
if(durable) {
source.setExpiryPolicy(TerminusExpiryPolicy.NEVER);
source.setDurable(TerminusDurability.UNSETTLED_STATE);
代码示例来源: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: 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: EnMasseProject/enmasse
private void createSender(org.apache.qpid.proton.engine.Session session) throws Exception {
Sender sender = session.sender(subscriberInfo.getClientId());
Target target = new Target();
target.setAddress(subscriberInfo.getClientAddress());
sender.setTarget(target);
Source source = new Source();
source.setAddress(subscriberInfo.getClientAddress());
source.setDurable(TerminusDurability.UNSETTLED_STATE);
sender.setSource(source);
sender.open();
}
}
代码示例来源:origin: org.apache.activemq/activemq-all
source.setDurable(TerminusDurability.UNSETTLED_STATE);
source.setExpiryPolicy(TerminusExpiryPolicy.NEVER);
source.setDistributionMode(COPY);
代码示例来源:origin: org.apache.activemq/artemis-proton-plug
source = new org.apache.qpid.proton.amqp.messaging.Source();
source.setAddress(queue);
source.setDurable(TerminusDurability.UNSETTLED_STATE);
source.setExpiryPolicy(TerminusExpiryPolicy.NEVER);
source.setDistributionMode(COPY);
代码示例来源:origin: apache/activemq-artemis
source.setAddress(getQueueName());
source.setFilter(filters);
source.setDurable(TerminusDurability.NONE);
source.setExpiryPolicy(TerminusExpiryPolicy.LINK_DETACH);
代码示例来源:origin: apache/activemq-artemis
source.setAddress(getQueueName());
source.setFilter(filters);
source.setDurable(TerminusDurability.NONE);
source.setExpiryPolicy(TerminusExpiryPolicy.LINK_DETACH);
代码示例来源: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();
}
}
内容来源于网络,如有侵权,请联系作者删除!