@Override public String getRemoteContainer() { return connection.getRemoteContainer(); }
public String getRemoteContainer() { return handler.getConnection().getRemoteContainer(); }
public String getRemoteContainer() { return handler.getConnection().getRemoteContainer(); }
public String getRemoteContainer() { return handler.getConnection().getRemoteContainer(); }
public static String getLinkName(final Session session) { // returned linkName lookslike: ea9cac_8b_G27_1479943074829 final String linkNamePrefix = StringUtil.getRandomString(); final String linkNameWithServiceRoleTracker = session.getConnection() != null && !StringUtil.isNullOrEmpty(session.getConnection().getRemoteContainer()) ? linkNamePrefix.concat(TrackingUtil.TRACKING_ID_TOKEN_SEPARATOR).concat(session.getConnection().getRemoteContainer() .substring(Math.max(session.getConnection().getRemoteContainer().length() - 7, 0), session.getConnection().getRemoteContainer().length())) : linkNamePrefix; return linkNameWithServiceRoleTracker.concat(TrackingUtil.TRACKING_ID_TOKEN_SEPARATOR).concat(String.valueOf(Instant.now().toEpochMilli())); } }
private Connection lookup(String host, String service) { for (Connector c : _driver.connectors()) { Connection connection = c.getConnection(); if (host.equals(connection.getRemoteContainer()) || service.equals(connection.getContext())) { return connection; } } return null; }
@Override public void onConnectionRemoteOpen(Event event) { if (TRACE_LOGGER.isInfoEnabled()) { TRACE_LOGGER.info(String.format(Locale.US, "onConnectionRemoteOpen: hostname[%s], remoteContainer[%s]", event.getConnection().getHostname(), event.getConnection().getRemoteContainer())); } this.amqpConnection.onOpenComplete(null); }
public boolean matches(Address address) { String host = address.getHost(); String port = address.getImpliedPort(); Connection conn = _connector.getConnection(); return host.equals(conn.getRemoteContainer()) || (_address.getHost().equals(host) && _address.getImpliedPort().equals(port)); }
private Connection lookup(String host, String service) { for (Connector<?> c : _driver.connectors()) { Connection connection = c.getConnection(); ConnectionContext ctx = (ConnectionContext) connection.getContext(); if (host.equals(connection.getRemoteContainer()) || service.equals(ctx.getService())) { return connection; } } return null; }
@Override public void onConnectionRemoteOpen(Event event) { TRACE_LOGGER.debug("Connection.onConnectionRemoteOpen: hostname:{}, remotecontainer:{}", event.getConnection().getHostname(), event.getConnection().getRemoteContainer()); this.messagingFactory.onConnectionOpen(); }
@Override public void inspectOpenedResource(Connection connection) { if (!BROKER_NAME.equals(connection.getRemoteContainer())) { markAsInvalid("Broker did not send the expected container ID"); } } });
public boolean validateConnection(org.apache.qpid.proton.engine.Connection connection, SASLResult saslResult) { remoteContainerId = connection.getRemoteContainer(); boolean idOK = server.addClientConnection(remoteContainerId, ExtCapability.needUniqueConnection(connection)); if (!idOK) { //https://issues.apache.org/jira/browse/ARTEMIS-728 Map<Symbol, Object> connProp = new HashMap<>(); connProp.put(AmqpSupport.CONNECTION_OPEN_FAILED, "true"); connection.setProperties(connProp); connection.getCondition().setCondition(AmqpError.INVALID_FIELD); Map<Symbol, Symbol> info = new HashMap<>(); info.put(AmqpSupport.INVALID_FIELD, AmqpSupport.CONTAINER_ID); connection.getCondition().setInfo(info); return false; } registeredConnectionId.set(true); return true; }
public boolean validateConnection(org.apache.qpid.proton.engine.Connection connection, SASLResult saslResult) { remoteContainerId = connection.getRemoteContainer(); boolean idOK = server.addClientConnection(remoteContainerId, ExtCapability.needUniqueConnection(connection)); if (!idOK) { //https://issues.apache.org/jira/browse/ARTEMIS-728 Map<Symbol, Object> connProp = new HashMap<>(); connProp.put(AmqpSupport.CONNECTION_OPEN_FAILED, "true"); connection.setProperties(connProp); connection.getCondition().setCondition(AmqpError.INVALID_FIELD); Map<Symbol, Symbol> info = new HashMap<>(); info.put(AmqpSupport.INVALID_FIELD, AmqpSupport.CONTAINER_ID); connection.getCondition().setInfo(info); return false; } registeredConnectionId.set(true); return true; }
@Override public void onEvent() { final RequestResponseChannel channel = innerChannel.unsafeGetIfOpened(); final String errorMessage; if (channel != null && channel.getState() == IOObject.IOObjectState.OPENED) { final String remoteContainerId = channel.getSendLink().getSession().getConnection().getRemoteContainer(); errorMessage = String.format("Management request timed out (%sms), after not receiving response from service. TrackingId: %s", timeoutInMillis, StringUtil.isNullOrEmpty(remoteContainerId) ? "n/a" : remoteContainerId); } else { errorMessage = "Management request timed out on the client - enable info level tracing to diagnose."; } resultFuture.completeExceptionally(new TimeoutException(errorMessage)); } });
linkSettings.linkName = !StringUtil.isNullOrEmpty(connection.getRemoteContainer()) ? sendLinkNamePrefix.concat(TrackingUtil.TRACKING_ID_TOKEN_SEPARATOR).concat(connection.getRemoteContainer()) : sendLinkNamePrefix;
final String receiveLinkName = !StringUtil.isNullOrEmpty(connection.getRemoteContainer()) ? receiveLinkNamePrefix.concat(TrackingUtil.TRACKING_ID_TOKEN_SEPARATOR).concat(connection.getRemoteContainer()) : receiveLinkNamePrefix; final Receiver receiver = session.receiver(receiveLinkName);
final Receiver receiver, final RoutingContext routingContext) throws Exception { message.setConnectionID(receiver.getSession().getConnection().getRemoteContainer()); invokeIncoming((AMQPMessage) message, (ActiveMQProtonRemotingConnection) transportConnection.getProtocolConnection()); serverSession.send(transaction, message, directDeliver, false, routingContext);
final Delivery delivery, final Receiver receiver) throws Exception { message.setConnectionID(receiver.getSession().getConnection().getRemoteContainer()); invokeIncoming((AMQPMessage) message, (ActiveMQProtonRemotingConnection) transportConnection.getProtocolConnection()); serverSession.send(transaction, message, false, false);
connectionInfo.setConnectionId(connectionId); String clientId = protonConnection.getRemoteContainer(); if (clientId != null && !clientId.isEmpty()) { connectionInfo.setClientId(clientId);
connectionInfo.setConnectionId(connectionId); String clientId = protonConnection.getRemoteContainer(); if (clientId != null && !clientId.isEmpty()) { connectionInfo.setClientId(clientId);