it.auties.whatsapp.api.PairingCodeHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of whatsappweb4j Show documentation
Show all versions of whatsappweb4j Show documentation
Standalone fully-featured Whatsapp Web API for Java and Kotlin
The newest version!
package it.auties.whatsapp.api;
import java.util.function.Consumer;
/**
* This interface allows to consume a pairing code sent by WhatsappWeb
*/
@FunctionalInterface
@SuppressWarnings("unused")
public non-sealed interface PairingCodeHandler extends Consumer, WebVerificationSupport {
/**
* Prints the pairing code to the terminal
*/
static PairingCodeHandler toTerminal() {
return System.out::println;
}
/**
* Discards the pairing code
*/
static PairingCodeHandler discarding() {
return (ignored) -> {};
}
}