@Override public Symbol[] getRemoteOfferedCapabilities() { return connection.getRemoteOfferedCapabilities(); }
private void getUserAndRolesFromConnection(Connection connection) { final Map<Symbol, Object> remoteProperties = connection.getRemoteProperties(); Symbol[] supportedCapabilities = connection.getRemoteOfferedCapabilities(); boolean supportsAuthz = supportedCapabilities != null && Arrays.asList(supportedCapabilities).contains(CAPABILITY_ADDRESS_AUTHZ); if (remoteProperties != null && remoteProperties.get(AUTHENTICATED_IDENTITY) instanceof Map) {
@Override protected void afterOpened() { // Initialize the connection properties so that the state of the remote can // be determined, this allows us to check for close pending. getResource().getProperties().initialize( getEndpoint().getRemoteOfferedCapabilities(), getEndpoint().getRemoteProperties()); // If there are failover servers in the open then we signal that to the listeners List<AmqpRedirect> failoverList = getResource().getProperties().getFailoverServerList(); if (!failoverList.isEmpty()) { List<URI> failoverURIs = new ArrayList<>(); for (AmqpRedirect redirect : failoverList) { try { failoverURIs.add(redirect.toURI()); } catch (Exception ex) { LOG.trace("Error while creating URI from failover server: {}", redirect); } } } }
@Override protected void afterOpened() { // Initialize the connection properties so that the state of the remote can // be determined, this allows us to check for close pending. getResource().getProperties().initialize( getEndpoint().getRemoteOfferedCapabilities(), getEndpoint().getRemoteProperties()); // If there are failover servers in the open then we signal that to the listeners List<AmqpRedirect> failoverList = getResource().getProperties().getFailoverServerList(); if (!failoverList.isEmpty()) { List<URI> failoverURIs = new ArrayList<>(); for (AmqpRedirect redirect : failoverList) { try { failoverURIs.add(redirect.toURI()); } catch (Exception ex) { LOG.trace("Error while creating URI from failover server: {}", redirect); } } } }
@Override public void inspectOpenedResource(Connection connection) { Symbol[] offered = connection.getRemoteOfferedCapabilities(); if (!contains(offered, ANONYMOUS_RELAY)) { markAsInvalid("Broker did not indicate it support anonymous relay"); return; } if (!contains(offered, DELAYED_DELIVERY)) { markAsInvalid("Broker did not indicate it support delayed message delivery"); return; } } });