Make RestChannelConsumer extend CheckedConsumer<RestChannel, Exception>
This commit is contained in:
parent
ab144c418e
commit
9a910d3c9d
|
@ -22,6 +22,7 @@ package org.elasticsearch.rest;
|
||||||
import org.apache.lucene.search.spell.LevensteinDistance;
|
import org.apache.lucene.search.spell.LevensteinDistance;
|
||||||
import org.apache.lucene.util.CollectionUtil;
|
import org.apache.lucene.util.CollectionUtil;
|
||||||
import org.elasticsearch.client.node.NodeClient;
|
import org.elasticsearch.client.node.NodeClient;
|
||||||
|
import org.elasticsearch.common.CheckedConsumer;
|
||||||
import org.elasticsearch.common.collect.Tuple;
|
import org.elasticsearch.common.collect.Tuple;
|
||||||
import org.elasticsearch.common.component.AbstractComponent;
|
import org.elasticsearch.common.component.AbstractComponent;
|
||||||
import org.elasticsearch.common.settings.Setting;
|
import org.elasticsearch.common.settings.Setting;
|
||||||
|
@ -125,14 +126,7 @@ public abstract class BaseRestHandler extends AbstractComponent implements RestH
|
||||||
* the request against a channel.
|
* the request against a channel.
|
||||||
*/
|
*/
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
protected interface RestChannelConsumer {
|
protected interface RestChannelConsumer extends CheckedConsumer<RestChannel, Exception> {
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue