public class AsyncWebSocketHttpServerExchange extends Object implements WebSocketHttpExchange
| Constructor and Description |
|---|
AsyncWebSocketHttpServerExchange(HttpServerExchange exchange, Set<WebSocketChannel> peerConnections) |
| Modifier and Type | Method and Description |
|---|---|
void | close() Forcibly close the exchange. |
void | endExchange() End the exchange normally. |
<T> T | getAttachment(AttachmentKey<T> key) |
ByteBufferPool | getBufferPool() |
org.xnio.OptionMap | getOptions() |
Set<WebSocketChannel> | getPeerConnections() |
String | getQueryString() |
String | getRequestHeader(String headerName) gets the first request header with the specified name |
Map<String,List<String>> | getRequestHeaders() |
Map<String,List<String>> | getRequestParameters() |
String | getRequestScheme() Get the request scheme, usually http or https |
String | getRequestURI() |
String | getResponseHeader(String headerName) get a response header |
Map<String,List<String>> | getResponseHeaders() |
Object | getSession() Gets the session, if any |
Principal | getUserPrincipal() |
boolean | isUserInRole(String role) |
<T> void | putAttachment(AttachmentKey<T> key, T value) |
org.xnio.IoFuture<byte[]> | readRequestData() Gets the body of the request. |
org.xnio.IoFuture<Void> | sendData(ByteBuffer data) Send some data |
void | setResponseHeader(String headerName, String headerValue) Set a response header |
void | setResponseHeaders(Map<String,List<String>> headers) Sets the response headers |
void | upgradeChannel(HttpUpgradeListener upgradeCallback) Upgrade the underlying channel |
public AsyncWebSocketHttpServerExchange(HttpServerExchange exchange, Set<WebSocketChannel> peerConnections)
public <T> void putAttachment(AttachmentKey<T> key, T value)
putAttachment in interface WebSocketHttpExchangepublic <T> T getAttachment(AttachmentKey<T> key)
getAttachment in interface WebSocketHttpExchangepublic String getRequestHeader(String headerName)
WebSocketHttpExchangegetRequestHeader in interface WebSocketHttpExchangeheaderName - The header namepublic Map<String,List<String>> getRequestHeaders()
getRequestHeaders in interface WebSocketHttpExchangepublic String getResponseHeader(String headerName)
WebSocketHttpExchangegetResponseHeader in interface WebSocketHttpExchangeheaderName - The header namepublic Map<String,List<String>> getResponseHeaders()
getResponseHeaders in interface WebSocketHttpExchangepublic void setResponseHeaders(Map<String,List<String>> headers)
WebSocketHttpExchangesetResponseHeaders in interface WebSocketHttpExchangepublic void setResponseHeader(String headerName, String headerValue)
WebSocketHttpExchangesetResponseHeader in interface WebSocketHttpExchangeheaderName - The header nameheaderValue - The header valuepublic void upgradeChannel(HttpUpgradeListener upgradeCallback)
WebSocketHttpExchangeupgradeChannel in interface WebSocketHttpExchangepublic org.xnio.IoFuture<Void> sendData(ByteBuffer data)
WebSocketHttpExchangesendData in interface WebSocketHttpExchangedata - The datapublic org.xnio.IoFuture<byte[]> readRequestData()
WebSocketHttpExchangereadRequestData in interface WebSocketHttpExchangepublic void endExchange()
WebSocketHttpExchangeendExchange in interface WebSocketHttpExchangepublic void close()
WebSocketHttpExchangeclose in interface WebSocketHttpExchangeclose in interface Closeableclose in interface AutoCloseablepublic String getRequestScheme()
WebSocketHttpExchangegetRequestScheme in interface WebSocketHttpExchangepublic String getRequestURI()
getRequestURI in interface WebSocketHttpExchangepublic ByteBufferPool getBufferPool()
getBufferPool in interface WebSocketHttpExchangepublic String getQueryString()
getQueryString in interface WebSocketHttpExchangepublic Object getSession()
WebSocketHttpExchangegetSession in interface WebSocketHttpExchangepublic Map<String,List<String>> getRequestParameters()
getRequestParameters in interface WebSocketHttpExchangepublic Principal getUserPrincipal()
getUserPrincipal in interface WebSocketHttpExchangepublic boolean isUserInRole(String role)
isUserInRole in interface WebSocketHttpExchangepublic Set<WebSocketChannel> getPeerConnections()
getPeerConnections in interface WebSocketHttpExchangepublic org.xnio.OptionMap getOptions()
getOptions in interface WebSocketHttpExchangeCopyright © 2020 JBoss by Red Hat. All rights reserved.