org.apache.qpid.proton.amqp.Symbol.getSymbol()方法的使用及代码示例

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

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

Symbol.getSymbol介绍

暂无

代码示例

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

public static Symbol valueOf(String symbolVal)
{
  return getSymbol(symbolVal);
}

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

public static Symbol valueOf(String symbolVal)
{
  return getSymbol(symbolVal);
}

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

public static Symbol valueOf(String symbolVal)
{
  return getSymbol(symbolVal);
}

代码示例来源:origin: Azure/azure-iot-sdk-java

protected void addAmqpLinkProperty(String key, String value)
{
  this.amqpProperties.put(Symbol.getSymbol(key), value);
}

代码示例来源:origin: eclipse/hono

/**
 * Creates a new exception for an error and description.
 * 
 * @param error The AMQP error to convey in this exception.
 * @param description A textual description of the context the error occurred in.
 */
public AmqpErrorException(final String error, final String description) {
  super(Objects.requireNonNull(description));
  this.error = Symbol.getSymbol(Objects.requireNonNull(error));
}

代码示例来源:origin: org.eclipse.hono/hono-core

/**
 * Creates a new exception for an error and description.
 * 
 * @param error The AMQP error to convey in this exception.
 * @param description A textual description of the context the error occurred in.
 */
public AmqpErrorException(final String error, final String description) {
  super(Objects.requireNonNull(description));
  this.error = Symbol.getSymbol(Objects.requireNonNull(error));
}

代码示例来源:origin: strimzi/strimzi-kafka-bridge

/**
 * Create a new AMQP error condition
 *
 * @param error            AMQP error
 * @param description    description for the AMQP error condition
 * @return                AMQP error condition
 */
static ErrorCondition newError(String error, String description) {
  return new ErrorCondition(Symbol.getSymbol(error), description);
}

代码示例来源:origin: stackoverflow.com

@Override
public void serialize(Symbol symbol, JsonGenerator jgen, SerializerProvider serializers) throws IOException, JsonProcessingException {
  jgen.writeStartObject();

  jgen.writeStringField("symbol", symbol.getSymbol());
   //Changed name to full_name as the field name of Json string
  jgen.writeStringField("full_name", symbol.getName());
  jgen.writeEndObject(); 
}

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

private Object getMessageAnnotation(String annotation) {
 return getMessageAnnotation(Symbol.getSymbol(annotation));
}

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

private void setMessageAnnotation(String annotation, Object value) {
 setMessageAnnotation(Symbol.getSymbol(annotation), value);
}

代码示例来源:origin: eclipse/hono

private boolean isLegacyClient(final ProtonConnection con) {
  return Optional.ofNullable(con.getRemoteProperties()).map(props -> {
    final Object obj = props.get(Symbol.getSymbol("version"));
    if (obj instanceof String) {
      final int[] version = parseVersionString((String) obj);
      return version[IDX_MAJOR_VERSION] == 1 && version[IDX_MINOR_VERSION] < 4;
    } else {
      return false;
    }
  }).orElse(false);
}

代码示例来源:origin: strimzi/strimzi-kafka-bridge

private void commitHandler(AsyncResult<Void> seekResult) {
  if (seekResult.failed()) {
    ErrorCondition condition =
        new ErrorCondition(Symbol.getSymbol(AmqpBridge.AMQP_ERROR_KAFKA_COMMIT),
            "Error in commit");
    sendAmqpError(condition);
  }
}

代码示例来源:origin: org.eclipse.hono/hono-core

@Override
public void put(final String key, final String value) {
  getDeliveryAnnotations().getValue().put(Symbol.getSymbol(key), value);
}

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

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

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

@Override
  public Target getTarget(String address) {
    Target target = super.getTarget(address);
    target.setCapabilities(Symbol.getSymbol("topic"));
    return target;
  }
}

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

@Override
public Object removeAnnotation(SimpleString key) {
 return removeSymbol(Symbol.getSymbol(key.toString()));
}

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

@Override
public Object removeAnnotation(SimpleString key) {
 return removeMessageAnnotation(Symbol.getSymbol(key.toString()));
}

代码示例来源:origin: strimzi/strimzi-kafka-bridge

/**
 * Convert this exception into an {@code ErrorCondition}.
 */
public ErrorCondition toCondition() {
  return new ErrorCondition(Symbol.getSymbol(this.error), getMessage());
}

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

public void addTransactionHandler(Coordinator coordinator, Receiver receiver) {
 ProtonTransactionHandler transactionHandler = new ProtonTransactionHandler(sessionSPI, connection);
 coordinator.setCapabilities(Symbol.getSymbol("amqp:local-transactions"), Symbol.getSymbol("amqp:multi-txns-per-ssn"), Symbol.getSymbol("amqp:multi-ssns-per-txn"));
 receiver.setContext(transactionHandler);
 connection.runNow(() -> {
   receiver.open();
   receiver.flow(connection.getAmqpCredits());
   connection.flush();
 });
}

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

public void addTransactionHandler(Coordinator coordinator, Receiver receiver) {
 ProtonTransactionHandler transactionHandler = new ProtonTransactionHandler(sessionSPI, connection);
 coordinator.setCapabilities(Symbol.getSymbol("amqp:local-transactions"), Symbol.getSymbol("amqp:multi-txns-per-ssn"), Symbol.getSymbol("amqp:multi-ssns-per-txn"));
 receiver.setContext(transactionHandler);
 connection.lock();
 try {
   receiver.open();
   receiver.flow(connection.getAmqpCredits());
 } finally {
   connection.unlock();
 }
}

相关文章