Make RestChannelConsumer extend CheckedConsumer<RestChannel, Exception>

This commit is contained in:
javanna 2017-01-12 18:06:28 +01:00 committed by Luca Cavanna
parent ab144c418e
commit 9a910d3c9d
1 changed files with 2 additions and 8 deletions

View File

@ -22,6 +22,7 @@ package org.elasticsearch.rest;
import org.apache.lucene.search.spell.LevensteinDistance;
import org.apache.lucene.util.CollectionUtil;
import org.elasticsearch.client.node.NodeClient;
import org.elasticsearch.common.CheckedConsumer;
import org.elasticsearch.common.collect.Tuple;
import org.elasticsearch.common.component.AbstractComponent;
import org.elasticsearch.common.settings.Setting;
@ -125,14 +126,7 @@ public abstract class BaseRestHandler extends AbstractComponent implements RestH
* the request against a channel.
*/
@FunctionalInterface
protected interface RestChannelConsumer {
/**
* Executes a request against the given channel.
*
* @param channel the channel for sending the response
* @throws Exception if an exception occurred executing the request
*/
void accept(RestChannel channel) throws Exception;
protected interface RestChannelConsumer extends CheckedConsumer<RestChannel, Exception> {
}
/**