Package org.elasticsearch.http
Interface HttpChannel
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
,CloseableChannel
public interface HttpChannel extends CloseableChannel
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.net.InetSocketAddress
getLocalAddress()
Returns the local address for this channel.java.net.InetSocketAddress
getRemoteAddress()
Returns the remote address for this channel.void
sendResponse(HttpResponse response, ActionListener<java.lang.Void> listener)
Sends an http response to the channel.-
Methods inherited from interface org.elasticsearch.common.network.CloseableChannel
addCloseListener, close, isOpen
-
-
-
-
Method Detail
-
sendResponse
void sendResponse(HttpResponse response, ActionListener<java.lang.Void> listener)
Sends an http response to the channel. The listener will be executed once the send process has been completed.- Parameters:
response
- to send to channellistener
- to execute upon send completion
-
getLocalAddress
java.net.InetSocketAddress getLocalAddress()
Returns the local address for this channel.- Returns:
- the local address of this channel.
-
getRemoteAddress
java.net.InetSocketAddress getRemoteAddress()
Returns the remote address for this channel. Can be null if channel does not have a remote address.- Returns:
- the remote address of this channel.
-
-