@Test(expected = IllegalArgumentException.class) public void testGetMessageRoutingInformationThrowsIllegalArgumentExceptionIfEndpointIsMissing() { ServiceInstance remoteInstance = mock(ServiceInstance.class); when(remoteInstance.getServiceId()).thenReturn(SERVICE_INSTANCE_ID); when(remoteInstance.getUri()).thenReturn(null); testSubject.getMessageRoutingInformation(remoteInstance); }
@Override protected Optional<MessageRoutingInformation> getMessageRoutingInformation(ServiceInstance serviceInstance) { if (enforceHttpDiscovery) { return requestMessageRoutingInformation(serviceInstance); } Optional<MessageRoutingInformation> defaultMessageRoutingInfo = super.getMessageRoutingInformation(serviceInstance); return defaultMessageRoutingInfo.isPresent() ? defaultMessageRoutingInfo : requestMessageRoutingInformation(serviceInstance); }
SpringCloudHttpBackupCommandRouter extends SpringCloudCommandRouter { @Override protected Optional<MessageRoutingInformation> getMessageRoutingInformation(ServiceInstance serviceInstance) { if (enforceHttpDiscovery) { return requestMessageRoutingInformation(serviceInstance); } Optional<MessageRoutingInformation> defaultMessageRoutingInfo = super.getMessageRoutingInformation(serviceInstance); return defaultMessageRoutingInfo.isPresent() ? defaultMessageRoutingInfo : requestMessageRoutingInformation(serviceInstance); } }
SpringCloudHttpBackupCommandRouter extends SpringCloudCommandRouter { @Override protected Optional<MessageRoutingInformation> getMessageRoutingInformation(ServiceInstance serviceInstance) { if (enforceHttpDiscovery) { return requestMessageRoutingInformation(serviceInstance); } Optional<MessageRoutingInformation> defaultMessageRoutingInfo = super.getMessageRoutingInformation(serviceInstance); return defaultMessageRoutingInfo.isPresent() ? defaultMessageRoutingInfo : requestMessageRoutingInformation(serviceInstance); } protected  SpringCloudHttpBackupCommandRouter(Builder builder); }
SpringCloudHttpBackupCommandRouter extends SpringCloudCommandRouter { @Override protected Optional<MessageRoutingInformation> getMessageRoutingInformation(ServiceInstance serviceInstance) { if (enforceHttpDiscovery) { return requestMessageRoutingInformation(serviceInstance); } Optional<MessageRoutingInformation> defaultMessageRoutingInfo = super.getMessageRoutingInformation(serviceInstance); return defaultMessageRoutingInfo.isPresent() ? defaultMessageRoutingInfo : requestMessageRoutingInformation(serviceInstance); } protected  SpringCloudHttpBackupCommandRouter(Builder builder); static Builder builder(); @Override void updateMembership(int loadFactor, CommandMessageFilter commandFilter); @GetMapping MessageRoutingInformation getLocalMessageRoutingInformation(); }
SpringCloudHttpBackupCommandRouter extends SpringCloudCommandRouter { @Override protected Optional<MessageRoutingInformation> getMessageRoutingInformation(ServiceInstance serviceInstance) { if (enforceHttpDiscovery) { return requestMessageRoutingInformation(serviceInstance); } Optional<MessageRoutingInformation> defaultMessageRoutingInfo = super.getMessageRoutingInformation(serviceInstance); return defaultMessageRoutingInfo.isPresent() ? defaultMessageRoutingInfo : requestMessageRoutingInformation(serviceInstance); } protected  SpringCloudHttpBackupCommandRouter(Builder builder); static Builder builder(); @Override void updateMembership(int loadFactor, CommandMessageFilter commandFilter); @GetMapping MessageRoutingInformation getLocalMessageRoutingInformation();  }