AsyncEventExecutor -> AwaitingEventExecutor

This commit is contained in:
Andrew Steinborn
2021-05-23 17:51:07 -04:00
parent 51f923bf2d
commit 64d30fba81
4 changed files with 12 additions and 9 deletions

View File

@@ -9,8 +9,13 @@ package com.velocitypowered.api.event;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* An event handler that returns an {@link EventTask} to await on.
*
* @param <E> event type
*/
@FunctionalInterface
public interface AsyncEventExecutor<E> extends EventHandler<E> {
public interface AwaitingEventExecutor<E> extends EventHandler<E> {
default void execute(E event) {
throw new UnsupportedOperationException(

View File

@@ -11,9 +11,8 @@ import org.checkerframework.checker.nullness.qual.Nullable;
/**
* Represents an interface to perform direct dispatch of an event. This makes integration easier to
* achieve with platforms such as RxJava. While this interface can be used to implement an
* asynchronous event handler, {@link AsyncEventExecutor} provides a more idiomatic means of doing
* so.
* achieve with platforms such as RxJava. While this interface can be used to implement an awaiting
* event handler, {@link AwaitingEventExecutor} provides a more idiomatic means to doing so.
*/
@FunctionalInterface
public interface EventHandler<E> {