@Override public ProtonConnectionImpl setDesiredCapabilities(Symbol[] capabilities) { connection.setDesiredCapabilities(capabilities); return this; }
@Override protected Connection createEndpoint(JmsConnectionInfo resourceInfo) { String hostname = getParent().getVhost(); if (hostname == null) { hostname = getParent().getRemoteURI().getHost(); } else if (hostname.isEmpty()) { hostname = null; } Map<Symbol, Object> props = new LinkedHashMap<Symbol, Object>(); props.put(AmqpSupport.PRODUCT, MetaDataSupport.PROVIDER_NAME); props.put(AmqpSupport.VERSION, MetaDataSupport.PROVIDER_VERSION); props.put(AmqpSupport.PLATFORM, MetaDataSupport.PLATFORM_DETAILS); Connection connection = getParent().getProtonConnection(); connection.setHostname(hostname); connection.setContainer(resourceInfo.getClientId()); connection.setDesiredCapabilities(new Symbol[] { SOLE_CONNECTION_CAPABILITY, DELAYED_DELIVERY, ANONYMOUS_RELAY, SHARED_SUBS}); connection.setProperties(props); return connection; }
@Override protected Connection createEndpoint(JmsConnectionInfo resourceInfo) { String hostname = getParent().getVhost(); if (hostname == null) { hostname = getParent().getRemoteURI().getHost(); } else if (hostname.isEmpty()) { hostname = null; } Map<Symbol, Object> props = new LinkedHashMap<Symbol, Object>(); props.put(AmqpSupport.PRODUCT, MetaDataSupport.PROVIDER_NAME); props.put(AmqpSupport.VERSION, MetaDataSupport.PROVIDER_VERSION); props.put(AmqpSupport.PLATFORM, MetaDataSupport.PLATFORM_DETAILS); Connection connection = getParent().getProtonConnection(); connection.setHostname(hostname); connection.setContainer(resourceInfo.getClientId()); connection.setDesiredCapabilities(new Symbol[] { SOLE_CONNECTION_CAPABILITY, DELAYED_DELIVERY, ANONYMOUS_RELAY, SHARED_SUBS}); connection.setProperties(props); return connection; }
private void performConnectionOpen(Connection connection, InputStream in, OutputStream out) throws IOException, LoginException { connection.setHostname(saslHostname); connection.setContainer(container); connection.setDesiredCapabilities(new Symbol[] {CAPABILITY_ADDRESS_AUTHZ}); connection.open(); writeToNetwork(connection, out); readFromNetwork(connection, in, () -> connection.getRemoteState() == EndpointState.UNINITIALIZED); }
getEndpoint().setDesiredCapabilities(getDesiredCapabilities().toArray(new Symbol[0]));