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

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

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

Source.getDynamic介绍

暂无

代码示例

代码示例来源:origin: vert-x3/vertx-examples

  1. if(remoteSource.getDynamic()) {
  2. String dynamicAddress = UUID.randomUUID().toString();
  3. remoteSource.setAddress(dynamicAddress);

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

  1. @Override
  2. public String toString()
  3. {
  4. return "Source{" +
  5. "address='" + getAddress() + '\'' +
  6. ", durable=" + getDurable() +
  7. ", expiryPolicy=" + getExpiryPolicy() +
  8. ", timeout=" + getTimeout() +
  9. ", dynamic=" + getDynamic() +
  10. ", dynamicNodeProperties=" + getDynamicNodeProperties() +
  11. ", distributionMode=" + _distributionMode +
  12. ", filter=" + _filter +
  13. ", defaultOutcome=" + _defaultOutcome +
  14. ", outcomes=" + (_outcomes == null ? null : Arrays.asList(_outcomes)) +
  15. ", capabilities=" + (getCapabilities() == null ? null : Arrays.asList(getCapabilities())) +
  16. '}';
  17. }

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

  1. @Override
  2. public String toString()
  3. {
  4. return "Source{" +
  5. "address='" + getAddress() + '\'' +
  6. ", durable=" + getDurable() +
  7. ", expiryPolicy=" + getExpiryPolicy() +
  8. ", timeout=" + getTimeout() +
  9. ", dynamic=" + getDynamic() +
  10. ", dynamicNodeProperties=" + getDynamicNodeProperties() +
  11. ", distributionMode=" + _distributionMode +
  12. ", filter=" + _filter +
  13. ", defaultOutcome=" + _defaultOutcome +
  14. ", outcomes=" + (_outcomes == null ? null : Arrays.asList(_outcomes)) +
  15. ", capabilities=" + (getCapabilities() == null ? null : Arrays.asList(getCapabilities())) +
  16. '}';
  17. }
  18. }

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

  1. SimpleString queueName = SimpleString.toSimpleString(source.getAddress());
  2. QueueQueryResult result = sessionSPI.queueQuery(queueName, routingTypeToUse, false);
  3. if (result.isExists() && source.getDynamic()) {
  4. sessionSPI.deleteQueue(queueName);
  5. } else {
  6. } else if (source != null && source.getDynamic() && (source.getExpiryPolicy() == TerminusExpiryPolicy.LINK_DETACH || source.getExpiryPolicy() == TerminusExpiryPolicy.SESSION_END)) {
  7. try {
  8. sessionSPI.removeTemporaryQueue(SimpleString.toSimpleString(source.getAddress()));

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

  1. @Override
  2. public String toString()
  3. {
  4. return "Source{" +
  5. "address='" + getAddress() + '\'' +
  6. ", durable=" + getDurable() +
  7. ", expiryPolicy=" + getExpiryPolicy() +
  8. ", timeout=" + getTimeout() +
  9. ", dynamic=" + getDynamic() +
  10. ", dynamicNodeProperties=" + getDynamicNodeProperties() +
  11. ", distributionMode=" + _distributionMode +
  12. ", filter=" + _filter +
  13. ", defaultOutcome=" + _defaultOutcome +
  14. ", outcomes=" + (_outcomes == null ? null : Arrays.asList(_outcomes)) +
  15. ", capabilities=" + (getCapabilities() == null ? null : Arrays.asList(getCapabilities())) +
  16. '}';
  17. }

代码示例来源:origin: org.apache.activemq/artemis-amqp-protocol

  1. SimpleString queueName = SimpleString.toSimpleString(source.getAddress());
  2. QueueQueryResult result = sessionSPI.queueQuery(queueName, routingTypeToUse, false);
  3. if (result.isExists() && source.getDynamic()) {
  4. sessionSPI.deleteQueue(queueName);
  5. } else {
  6. } else if (source != null && source.getDynamic() && (source.getExpiryPolicy() == TerminusExpiryPolicy.LINK_DETACH || source.getExpiryPolicy() == TerminusExpiryPolicy.SESSION_END)) {
  7. try {
  8. sessionSPI.removeTemporaryQueue(SimpleString.toSimpleString(source.getAddress()));

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

  1. public Object get(final int index)
  2. {
  3. switch(index)
  4. {
  5. case 0:
  6. return _impl.getAddress();
  7. case 1:
  8. return _impl.getDurable().getValue();
  9. case 2:
  10. return _impl.getExpiryPolicy().getPolicy();
  11. case 3:
  12. return _impl.getTimeout();
  13. case 4:
  14. return _impl.getDynamic();
  15. case 5:
  16. return _impl.getDynamicNodeProperties();
  17. case 6:
  18. return _impl.getDistributionMode();
  19. case 7:
  20. return _impl.getFilter();
  21. case 8:
  22. return _impl.getDefaultOutcome();
  23. case 9:
  24. return _impl.getOutcomes();
  25. case 10:
  26. return _impl.getCapabilities();
  27. }
  28. throw new IllegalStateException("Unknown index " + index);
  29. }

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

  1. return;
  2. } else if (source.getDynamic()) {
  3. destination = connection.createTemporaryDestination(protonSender, source.getCapabilities());

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

  1. public Object get(final int index)
  2. {
  3. switch(index)
  4. {
  5. case 0:
  6. return _impl.getAddress();
  7. case 1:
  8. return _impl.getDurable().getValue();
  9. case 2:
  10. return _impl.getExpiryPolicy().getPolicy();
  11. case 3:
  12. return _impl.getTimeout();
  13. case 4:
  14. return _impl.getDynamic();
  15. case 5:
  16. return _impl.getDynamicNodeProperties();
  17. case 6:
  18. return _impl.getDistributionMode();
  19. case 7:
  20. return _impl.getFilter();
  21. case 8:
  22. return _impl.getDefaultOutcome();
  23. case 9:
  24. return _impl.getOutcomes();
  25. case 10:
  26. return _impl.getCapabilities();
  27. }
  28. throw new IllegalStateException("Unknown index " + index);
  29. }

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

  1. return;
  2. } else if (source.getDynamic()) {
  3. destination = connection.createTemporaryDestination(protonSender, source.getCapabilities());

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

  1. public Object get(final int index)
  2. {
  3. switch(index)
  4. {
  5. case 0:
  6. return _impl.getAddress();
  7. case 1:
  8. return _impl.getDurable().getValue();
  9. case 2:
  10. return _impl.getExpiryPolicy().getPolicy();
  11. case 3:
  12. return _impl.getTimeout();
  13. case 4:
  14. return _impl.getDynamic();
  15. case 5:
  16. return _impl.getDynamicNodeProperties();
  17. case 6:
  18. return _impl.getDistributionMode();
  19. case 7:
  20. return _impl.getFilter();
  21. case 8:
  22. return _impl.getDefaultOutcome();
  23. case 9:
  24. return _impl.getOutcomes();
  25. case 10:
  26. return _impl.getCapabilities();
  27. }
  28. throw new IllegalStateException("Unknown index " + index);
  29. }

代码示例来源:origin: org.apache.activemq/artemis-amqp-protocol

  1. throw new ActiveMQAMQPNotFoundException("Unknown subscription link: " + sender.getName());
  2. } else if (source.getDynamic()) {

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

  1. public Object get(final int index)
  2. {
  3. switch(index)
  4. {
  5. case 0:
  6. return _impl.getAddress();
  7. case 1:
  8. return _impl.getDurable().getValue();
  9. case 2:
  10. return _impl.getExpiryPolicy().getPolicy();
  11. case 3:
  12. return _impl.getTimeout();
  13. case 4:
  14. return _impl.getDynamic();
  15. case 5:
  16. return _impl.getDynamicNodeProperties();
  17. case 6:
  18. return _impl.getDistributionMode();
  19. case 7:
  20. return _impl.getFilter();
  21. case 8:
  22. return _impl.getDefaultOutcome();
  23. case 9:
  24. return _impl.getOutcomes();
  25. case 10:
  26. return _impl.getCapabilities();
  27. }
  28. throw new IllegalStateException("Unknown index " + index);
  29. }

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

  1. throw new ActiveMQAMQPNotFoundException("Unknown subscription link: " + sender.getName());
  2. } else if (source.getDynamic()) {

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

  1. public int size()
  2. {
  3. return _impl.getCapabilities() != null
  4. ? 11
  5. : _impl.getOutcomes() != null
  6. ? 10
  7. : _impl.getDefaultOutcome() != null
  8. ? 9
  9. : _impl.getFilter() != null
  10. ? 8
  11. : _impl.getDistributionMode() != null
  12. ? 7
  13. : _impl.getDynamicNodeProperties() != null
  14. ? 6
  15. : _impl.getDynamic()
  16. ? 5
  17. : (_impl.getTimeout() != null && !_impl.getTimeout().equals(UnsignedInteger.ZERO))
  18. ? 4
  19. : _impl.getExpiryPolicy() != TerminusExpiryPolicy.SESSION_END
  20. ? 3
  21. : _impl.getDurable() != TerminusDurability.NONE
  22. ? 2
  23. : _impl.getAddress() != null
  24. ? 1
  25. : 0;
  26. }

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

  1. if (source.getDynamic()) {

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

  1. public int size()
  2. {
  3. return _impl.getCapabilities() != null
  4. ? 11
  5. : _impl.getOutcomes() != null
  6. ? 10
  7. : _impl.getDefaultOutcome() != null
  8. ? 9
  9. : _impl.getFilter() != null
  10. ? 8
  11. : _impl.getDistributionMode() != null
  12. ? 7
  13. : _impl.getDynamicNodeProperties() != null
  14. ? 6
  15. : _impl.getDynamic()
  16. ? 5
  17. : (_impl.getTimeout() != null && !_impl.getTimeout().equals(UnsignedInteger.ZERO))
  18. ? 4
  19. : _impl.getExpiryPolicy() != TerminusExpiryPolicy.SESSION_END
  20. ? 3
  21. : _impl.getDurable() != TerminusDurability.NONE
  22. ? 2
  23. : _impl.getAddress() != null
  24. ? 1
  25. : 0;
  26. }

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

  1. Source remoteSource = (Source) serverSender.getRemoteSource();
  2. context.assertNotNull(remoteSource, "source should not be null");
  3. context.assertTrue(remoteSource.getDynamic(), "source should be dynamic");
  4. context.assertNull(remoteSource.getAddress(), "expected null address");

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

  1. @SuppressWarnings("unchecked")
  2. protected void doTestCreateDynamicReceiver(boolean topic) throws Exception {
  3. Source source = createDynamicSource(topic);
  4. AmqpClient client = createAmqpClient();
  5. AmqpConnection connection = addConnection(client.connect());
  6. AmqpSession session = connection.createSession();
  7. AmqpReceiver receiver = session.createReceiver(source);
  8. assertNotNull(receiver);
  9. Source remoteSource = (Source) receiver.getEndpoint().getRemoteSource();
  10. assertTrue(remoteSource.getDynamic());
  11. assertTrue(remoteSource.getDurable().equals(TerminusDurability.NONE));
  12. assertTrue(remoteSource.getExpiryPolicy().equals(TerminusExpiryPolicy.LINK_DETACH));
  13. // Check the dynamic node lifetime-policy
  14. Map<Symbol, Object> dynamicNodeProperties = remoteSource.getDynamicNodeProperties();
  15. assertTrue(dynamicNodeProperties.containsKey(LIFETIME_POLICY));
  16. assertEquals(DeleteOnClose.getInstance(), dynamicNodeProperties.get(LIFETIME_POLICY));
  17. Queue queueView = getProxyToQueue(remoteSource.getAddress());
  18. assertNotNull(queueView);
  19. connection.close();
  20. }

相关文章