public class HttpConnection extends Object
Constructor and Description |
---|
HttpConnection(long requestId,
javax.servlet.AsyncContext context)
Constructs an HTTP Connection.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
The connection should be closed without delivering a stanza to the requestor.
|
void |
deliverBody(String body,
boolean async)
Delivers content to the client.
|
X509Certificate[] |
getPeerCertificates()
Returns the peer certificates for this connection.
|
InetAddress |
getRemoteAddr()
Returns the Internet Protocol (IP) address of the client
or last proxy that sent the request.
|
long |
getRequestId()
Returns the ID which uniquely identifies this connection.
|
HttpSession |
getSession()
Returns the session that this connection belongs to.
|
boolean |
isClosed()
Returns true if this connection has been closed, either a response was delivered to the
client or the server closed the connection abruptly.
|
boolean |
isSecure()
Returns true if this connection is using HTTPS.
|
String |
toString() |
public HttpConnection(long requestId, javax.servlet.AsyncContext context)
requestId
- the ID which uniquely identifies this request.context
- execution context of the servlet request that created this instance.public void close()
public boolean isClosed()
public boolean isSecure()
public void deliverBody(String body, boolean async) throws HttpConnectionClosedException, IOException
body
- the XMPP content to be forwarded to the client inside of a body tag.async
- when false, this method blocks until the data has been delivered to the client.HttpConnectionClosedException
- when this connection to the client has already received
a deliverable to forward to the clientIOException
- if an input or output exception occurredpublic long getRequestId()
public HttpSession getSession()
public InetAddress getRemoteAddr() throws UnknownHostException
UnknownHostException
- if no IP address for the peer could be found,public X509Certificate[] getPeerCertificates()
Copyright © 2003–2020 Ignite Realtime. All rights reserved.