com.king.platform.net.http.HttpClientWebSocketRequestBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of king-http-client Show documentation
Show all versions of king-http-client Show documentation
A asyncronous http client built ontop of netty.
package com.king.platform.net.http;
import java.time.Duration;
public interface HttpClientWebSocketRequestBuilder extends HttpClientRequestHeaderBuilder {
/**
* Specify what sub-protocol this client desires
*
* @param subProtocols the sub protocol
* @return this builder
*/
HttpClientWebSocketRequestBuilder subProtocols(String subProtocols);
/**
* Specify if the client should automatically send ping to the server to keep the connection alive.
*
* @param duration the duration between the pings
* @return this builder
*/
HttpClientWebSocketRequestBuilder pingEvery(Duration duration);
/**
* Specify if the client should automatically respond with pongs when it receives an ping from the server.
*
* @param autoPong true if it should respond.
* @return this builder
*/
HttpClientWebSocketRequestBuilder autoPong(boolean autoPong);
/**
* Specify if the client should automatically respond with the close frame to the server before closing the connection.
*
* @param autoCloseFrame true if it should respond.
* @return this builder
*/
HttpClientWebSocketRequestBuilder autoCloseFrame(boolean autoCloseFrame);
/**
* Build the reusable web-socket request
* @return the built request
*/
BuiltWebSocketRequest build();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy