io.quarkus.websockets.next.HandshakeRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-websockets-next Show documentation
Show all versions of quarkus-websockets-next Show documentation
Implementation of the WebSocket API with enhanced efficiency and usability
package io.quarkus.websockets.next;
import java.util.List;
import java.util.Map;
/**
* Provides some useful information about the initial handshake request.
*/
public interface HandshakeRequest {
/**
* The name is case insensitive.
*
* @param name
* @return the first header value for the given header name, or {@code null}
* @see HandshakeRequest#SEC_WEBSOCKET_KEY
* @see HandshakeRequest#SEC_WEBSOCKET_ACCEPT
* @see HandshakeRequest#SEC_WEBSOCKET_EXTENSIONS
* @see HandshakeRequest#SEC_WEBSOCKET_PROTOCOL
* @see HandshakeRequest#SEC_WEBSOCKET_VERSION
*/
String header(String name);
/**
* The name is case insensitive.
*
* @param name
* @return an immutable list of header values for the given header name, never {@code null}
* @see HandshakeRequest#SEC_WEBSOCKET_KEY
* @see HandshakeRequest#SEC_WEBSOCKET_ACCEPT
* @see HandshakeRequest#SEC_WEBSOCKET_EXTENSIONS
* @see HandshakeRequest#SEC_WEBSOCKET_PROTOCOL
* @see HandshakeRequest#SEC_WEBSOCKET_VERSION
*/
List headers(String name);
/**
* Returned header names are lower case.
*
* @return an immutable map of header names to header values
*/
Map> headers();
/**
*
* @return the scheme
*/
String scheme();
/**
*
* @return the host
*/
String host();
/**
*
* @return the port
*/
int port();
/**
*
* @return the path
*/
String path();
/**
*
* @return the query string
*/
String query();
/**
* See Sec-WebSocket-Key.
*/
String SEC_WEBSOCKET_KEY = "Sec-WebSocket-Key";
/**
* See Sec-WebSocket-Extensions.
*/
String SEC_WEBSOCKET_EXTENSIONS = "Sec-WebSocket-Extensions";
/**
* See Sec-WebSocket-Accept.
*/
String SEC_WEBSOCKET_ACCEPT = "Sec-WebSocket-Accept";
/**
* See Sec-WebSocket-Protocol.
*/
String SEC_WEBSOCKET_PROTOCOL = "Sec-WebSocket-Protocol";
/**
* See Sec-WebSocket-Version.
*/
String SEC_WEBSOCKET_VERSION = "Sec-WebSocket-Version";
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy