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

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

本文整理了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

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

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

@Override
public String toString()
{
  return "Source{" +
      "address='" + getAddress() + '\'' +
      ", durable=" + getDurable() +
      ", expiryPolicy=" + getExpiryPolicy() +
      ", timeout=" + getTimeout() +
      ", dynamic=" + getDynamic() +
      ", dynamicNodeProperties=" + getDynamicNodeProperties() +
      ", distributionMode=" + _distributionMode +
      ", filter=" + _filter +
      ", defaultOutcome=" + _defaultOutcome +
      ", outcomes=" + (_outcomes == null ? null : Arrays.asList(_outcomes)) +
      ", capabilities=" + (getCapabilities() == null ? null : Arrays.asList(getCapabilities())) +
      '}';
}

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

@Override
  public String toString()
  {
    return "Source{" +
        "address='" + getAddress() + '\'' +
        ", durable=" + getDurable() +
        ", expiryPolicy=" + getExpiryPolicy() +
        ", timeout=" + getTimeout() +
        ", dynamic=" + getDynamic() +
        ", dynamicNodeProperties=" + getDynamicNodeProperties() +
        ", distributionMode=" + _distributionMode +
        ", filter=" + _filter +
        ", defaultOutcome=" + _defaultOutcome +
        ", outcomes=" + (_outcomes == null ? null : Arrays.asList(_outcomes)) +
        ", capabilities=" + (getCapabilities() == null ? null : Arrays.asList(getCapabilities())) +
        '}';
  }
}

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

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

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

@Override
public String toString()
{
  return "Source{" +
      "address='" + getAddress() + '\'' +
      ", durable=" + getDurable() +
      ", expiryPolicy=" + getExpiryPolicy() +
      ", timeout=" + getTimeout() +
      ", dynamic=" + getDynamic() +
      ", dynamicNodeProperties=" + getDynamicNodeProperties() +
      ", distributionMode=" + _distributionMode +
      ", filter=" + _filter +
      ", defaultOutcome=" + _defaultOutcome +
      ", outcomes=" + (_outcomes == null ? null : Arrays.asList(_outcomes)) +
      ", capabilities=" + (getCapabilities() == null ? null : Arrays.asList(getCapabilities())) +
      '}';
}

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

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

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

public Object get(final int index)
{
  switch(index)
  {
    case 0:
      return _impl.getAddress();
    case 1:
      return _impl.getDurable().getValue();
    case 2:
      return _impl.getExpiryPolicy().getPolicy();
    case 3:
      return _impl.getTimeout();
    case 4:
      return _impl.getDynamic();
    case 5:
      return _impl.getDynamicNodeProperties();
    case 6:
      return _impl.getDistributionMode();
    case 7:
      return _impl.getFilter();
    case 8:
      return _impl.getDefaultOutcome();
    case 9:
      return _impl.getOutcomes();
    case 10:
      return _impl.getCapabilities();
  }
  throw new IllegalStateException("Unknown index " + index);
}

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

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

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

public Object get(final int index)
{
  switch(index)
  {
    case 0:
      return _impl.getAddress();
    case 1:
      return _impl.getDurable().getValue();
    case 2:
      return _impl.getExpiryPolicy().getPolicy();
    case 3:
      return _impl.getTimeout();
    case 4:
      return _impl.getDynamic();
    case 5:
      return _impl.getDynamicNodeProperties();
    case 6:
      return _impl.getDistributionMode();
    case 7:
      return _impl.getFilter();
    case 8:
      return _impl.getDefaultOutcome();
    case 9:
      return _impl.getOutcomes();
    case 10:
      return _impl.getCapabilities();
  }
  throw new IllegalStateException("Unknown index " + index);
}

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

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

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

public Object get(final int index)
{
  switch(index)
  {
    case 0:
      return _impl.getAddress();
    case 1:
      return _impl.getDurable().getValue();
    case 2:
      return _impl.getExpiryPolicy().getPolicy();
    case 3:
      return _impl.getTimeout();
    case 4:
      return _impl.getDynamic();
    case 5:
      return _impl.getDynamicNodeProperties();
    case 6:
      return _impl.getDistributionMode();
    case 7:
      return _impl.getFilter();
    case 8:
      return _impl.getDefaultOutcome();
    case 9:
      return _impl.getOutcomes();
    case 10:
      return _impl.getCapabilities();
  }
  throw new IllegalStateException("Unknown index " + index);
}

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

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

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

public Object get(final int index)
{
  switch(index)
  {
    case 0:
      return _impl.getAddress();
    case 1:
      return _impl.getDurable().getValue();
    case 2:
      return _impl.getExpiryPolicy().getPolicy();
    case 3:
      return _impl.getTimeout();
    case 4:
      return _impl.getDynamic();
    case 5:
      return _impl.getDynamicNodeProperties();
    case 6:
      return _impl.getDistributionMode();
    case 7:
      return _impl.getFilter();
    case 8:
      return _impl.getDefaultOutcome();
    case 9:
      return _impl.getOutcomes();
    case 10:
      return _impl.getCapabilities();
  }
  throw new IllegalStateException("Unknown index " + index);
}

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

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

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

public int size()
{
  return _impl.getCapabilities() != null
       ? 11
       : _impl.getOutcomes() != null
       ? 10
       : _impl.getDefaultOutcome() != null
       ? 9
       : _impl.getFilter() != null
       ? 8
       : _impl.getDistributionMode() != null
       ? 7
       : _impl.getDynamicNodeProperties() != null
       ? 6
       : _impl.getDynamic()
       ? 5
       : (_impl.getTimeout() != null && !_impl.getTimeout().equals(UnsignedInteger.ZERO))
       ? 4
       : _impl.getExpiryPolicy() != TerminusExpiryPolicy.SESSION_END
       ? 3
       : _impl.getDurable() != TerminusDurability.NONE
       ? 2
       : _impl.getAddress() != null
       ? 1
       : 0;
}

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

if (source.getDynamic()) {

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

public int size()
{
  return _impl.getCapabilities() != null
       ? 11
       : _impl.getOutcomes() != null
       ? 10
       : _impl.getDefaultOutcome() != null
       ? 9
       : _impl.getFilter() != null
       ? 8
       : _impl.getDistributionMode() != null
       ? 7
       : _impl.getDynamicNodeProperties() != null
       ? 6
       : _impl.getDynamic()
       ? 5
       : (_impl.getTimeout() != null && !_impl.getTimeout().equals(UnsignedInteger.ZERO))
       ? 4
       : _impl.getExpiryPolicy() != TerminusExpiryPolicy.SESSION_END
       ? 3
       : _impl.getDurable() != TerminusDurability.NONE
       ? 2
       : _impl.getAddress() != null
       ? 1
       : 0;
}

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

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

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

@SuppressWarnings("unchecked")
protected void doTestCreateDynamicReceiver(boolean topic) throws Exception {
 Source source = createDynamicSource(topic);
 AmqpClient client = createAmqpClient();
 AmqpConnection connection = addConnection(client.connect());
 AmqpSession session = connection.createSession();
 AmqpReceiver receiver = session.createReceiver(source);
 assertNotNull(receiver);
 Source remoteSource = (Source) receiver.getEndpoint().getRemoteSource();
 assertTrue(remoteSource.getDynamic());
 assertTrue(remoteSource.getDurable().equals(TerminusDurability.NONE));
 assertTrue(remoteSource.getExpiryPolicy().equals(TerminusExpiryPolicy.LINK_DETACH));
 // Check the dynamic node lifetime-policy
 Map<Symbol, Object> dynamicNodeProperties = remoteSource.getDynamicNodeProperties();
 assertTrue(dynamicNodeProperties.containsKey(LIFETIME_POLICY));
 assertEquals(DeleteOnClose.getInstance(), dynamicNodeProperties.get(LIFETIME_POLICY));
 Queue queueView = getProxyToQueue(remoteSource.getAddress());
 assertNotNull(queueView);
 connection.close();
}

相关文章