public interface WebSocketHttpExchange extends Closeable
Modifier and Type | Method and Description |
---|---|
void |
close()
Forcibly close the exchange.
|
void |
endExchange()
End the exchange normally.
|
<T> T |
getAttachment(AttachmentKey<T> key) |
org.xnio.Pool<ByteBuffer> |
getBufferPool() |
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
|
<T> void putAttachment(AttachmentKey<T> key, T value)
<T> T getAttachment(AttachmentKey<T> key)
String getRequestHeader(String headerName)
headerName
- The header nameMap<String,List<String>> getRequestHeaders()
String getResponseHeader(String headerName)
headerName
- The header nameMap<String,List<String>> getResponseHeaders()
void setResponseHeaders(Map<String,List<String>> headers)
void setResponseHeader(String headerName, String headerValue)
headerName
- The header nameheaderValue
- The header valuevoid upgradeChannel(HttpUpgradeListener upgradeCallback)
upgradeCallback
- org.xnio.IoFuture<Void> sendData(ByteBuffer data)
data
- The dataorg.xnio.IoFuture<byte[]> readRequestData()
void endExchange()
void close()
close
in interface AutoCloseable
close
in interface Closeable
String getRequestScheme()
String getRequestURI()
org.xnio.Pool<ByteBuffer> getBufferPool()
String getQueryString()
Object getSession()
Principal getUserPrincipal()
boolean isUserInRole(String role)
Copyright © 2014 JBoss by Red Hat. All rights reserved.