use of org.graylog2.shared.rest.resources.system.RemoteDeflectorResource in project graylog2-server by Graylog2.
the class ClusterDeflectorResource method getDeflectorResource.
private RemoteDeflectorResource getDeflectorResource() {
final Node master = findMasterNode();
final Function<String, Optional<RemoteDeflectorResource>> remoteInterfaceProvider = createRemoteInterfaceProvider(RemoteDeflectorResource.class);
final Optional<RemoteDeflectorResource> deflectorResource = remoteInterfaceProvider.apply(master.getNodeId());
return deflectorResource.orElseThrow(() -> new InternalServerErrorException("Unable to get remote deflector resource."));
}
Aggregations