public static Symbol valueOf(String symbolVal) { return getSymbol(symbolVal); }
public static Symbol valueOf(String symbolVal) { return getSymbol(symbolVal); }
public static Symbol valueOf(String symbolVal) { return getSymbol(symbolVal); }
protected void addAmqpLinkProperty(String key, String value) { this.amqpProperties.put(Symbol.getSymbol(key), value); }
/** * 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)); }
/** * 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)); }
/** * 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); }
@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(); }
private Object getMessageAnnotation(String annotation) { return getMessageAnnotation(Symbol.getSymbol(annotation)); }
private void setMessageAnnotation(String annotation, Object value) { setMessageAnnotation(Symbol.getSymbol(annotation), value); }
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); }
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); } }
@Override public void put(final String key, final String value) { getDeliveryAnnotations().getValue().put(Symbol.getSymbol(key), value); }
@Override public Source getSource(String address) { Source source = super.getSource(address); source.setCapabilities(Symbol.getSymbol("topic")); return source; }
@Override public Target getTarget(String address) { Target target = super.getTarget(address); target.setCapabilities(Symbol.getSymbol("topic")); return target; } }
@Override public Object removeAnnotation(SimpleString key) { return removeSymbol(Symbol.getSymbol(key.toString())); }
@Override public Object removeAnnotation(SimpleString key) { return removeMessageAnnotation(Symbol.getSymbol(key.toString())); }
/** * Convert this exception into an {@code ErrorCondition}. */ public ErrorCondition toCondition() { return new ErrorCondition(Symbol.getSymbol(this.error), getMessage()); }
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(); }); }
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(); } }