com.viber.bot.middleware.DefaultMiddleware Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of viber-bot Show documentation
Show all versions of viber-bot Show documentation
Use this library to communicate with the Viber API to develop a bot for https://developers.viber.com/.
package com.viber.bot.middleware;
import com.google.common.util.concurrent.ListenableFuture;
import com.viber.bot.Request;
import javax.annotation.Nonnull;
import java.io.InputStream;
public class DefaultMiddleware implements Middleware {
private final Middleware middleware;
public DefaultMiddleware(final @Nonnull RequestReceiver requestReceiver) {
middleware = new PubSubMiddleware(requestReceiver);
}
@Override
public ListenableFuture incoming(final Request request) {
return middleware.incoming(request);
}
}