public boolean isExchangeWithConsumerOkay(ServiceEndpoint endpoint, MessageExchange exchange) { String key = EndpointSupport.getKey(endpoint); Endpoint ep = this.registry.getEndpoint(key); if (ep != null) { if (ep.getRole() != Role.PROVIDER) { logger.debug("Endpoint {} is a consumer. Refusing exchange with consumer.", key); return false; } else { return ep.isExchangeOkay(exchange); } } else { logger.debug("No endpoint found for {}. Refusing exchange with consumer.", key); return false; } }
public boolean isExchangeWithConsumerOkay(ServiceEndpoint endpoint, MessageExchange exchange) { String key = EndpointSupport.getKey(endpoint); Endpoint ep = this.registry.getEndpoint(key); if (ep != null) { if (ep.getRole() != MessageExchange.Role.PROVIDER) { logger.debug("Endpoint {} is a consumer. Refusing exchange with consumer.", key); return false; } else { return ep.isExchangeOkay(exchange); } } else { logger.debug("No endpoint found for {}. Refusing exchange with consumer.", key); return false; } }