38 lines
990 B
Java
38 lines
990 B
Java
package envoy.client.data.commands;
|
|
|
|
import java.util.function.Supplier;
|
|
|
|
/**
|
|
* This interface defines an action that should be performed when a system
|
|
* command gets called.
|
|
* <p>
|
|
* Project: <strong>envoy-client</strong><br>
|
|
* File: <strong>OnCall.java</strong><br>
|
|
* Created: <strong>23.07.2020</strong><br>
|
|
*
|
|
* @author Leon Hofmeister
|
|
* @since Envoy Client v0.2-beta
|
|
*/
|
|
public interface OnCall {
|
|
|
|
/**
|
|
* Performs class specific actions when a {@link SystemCommand} has been called.
|
|
*
|
|
* The action that should be performed when this {@link SystemCommand} has been
|
|
* called.
|
|
*
|
|
* @since Envoy Client v0.2-beta
|
|
*/
|
|
void onCall();
|
|
|
|
/**
|
|
* Performs actions that can only be performed by classes that are not
|
|
* {@link SystemCommand}s when a SystemCommand has been called.
|
|
*
|
|
* @param consumer the action to perform when this {@link SystemCommand} has
|
|
* been called
|
|
* @since Envoy Client v0.2-beta
|
|
*/
|
|
void onCall(Supplier<Void> consumer);
|
|
}
|