use of org.graylog2.rest.resources.system.DeflectorResource 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