public class NettyWebSocketServerTransport extends org.elasticsearch.common.component.AbstractLifecycleComponent<HttpServerTransport> implements HttpServerTransport
| Modifier and Type | Field and Description |
|---|---|
protected OpenChannelsHandler |
serverOpenChannels |
| Constructor and Description |
|---|
NettyWebSocketServerTransport(org.elasticsearch.common.settings.Settings settings,
org.elasticsearch.common.network.NetworkService networkService,
org.elasticsearch.common.util.BigArrays bigArrays) |
| Modifier and Type | Method and Description |
|---|---|
org.elasticsearch.common.transport.BoundTransportAddress |
boundAddress()
Return the bound transport addess
|
org.jboss.netty.channel.Channel |
channel(Integer id)
Returns a channel if it is in the server open channel table, given by ID.
|
protected void |
doClose() |
protected void |
doStart() |
protected void |
doStop() |
void |
forward(String websocketNodeAddress,
Integer channelId,
org.elasticsearch.common.xcontent.XContentBuilder builder)
Forward a message to another node with websockets for delivery.
|
void |
httpServerAdapter(HttpServerAdapter httpServerAdapter)
Set HTTP server adapter
|
HttpInfo |
info() |
org.elasticsearch.common.settings.Settings |
settings() |
HttpStats |
stats()
Get HTTP statistics
|
void |
webSocketServerAdapter(WebSocketServerAdapter webSocketServerAdapter)
Set WebSocket server adapter
|
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected OpenChannelsHandler serverOpenChannels
@Inject public NettyWebSocketServerTransport(org.elasticsearch.common.settings.Settings settings, org.elasticsearch.common.network.NetworkService networkService, org.elasticsearch.common.util.BigArrays bigArrays)
public org.elasticsearch.common.settings.Settings settings()
public void httpServerAdapter(HttpServerAdapter httpServerAdapter)
HttpServerTransporthttpServerAdapter in interface HttpServerTransportpublic void webSocketServerAdapter(WebSocketServerAdapter webSocketServerAdapter)
HttpServerTransportwebSocketServerAdapter in interface HttpServerTransportprotected void doStart() throws org.elasticsearch.ElasticsearchException
doStart in class org.elasticsearch.common.component.AbstractLifecycleComponent<HttpServerTransport>org.elasticsearch.ElasticsearchExceptionprotected void doStop() throws org.elasticsearch.ElasticsearchException
doStop in class org.elasticsearch.common.component.AbstractLifecycleComponent<HttpServerTransport>org.elasticsearch.ElasticsearchExceptionprotected void doClose() throws org.elasticsearch.ElasticsearchException
doClose in class org.elasticsearch.common.component.AbstractLifecycleComponent<HttpServerTransport>org.elasticsearch.ElasticsearchExceptionpublic org.elasticsearch.common.transport.BoundTransportAddress boundAddress()
HttpServerTransportboundAddress in interface HttpServerTransportpublic HttpInfo info()
info in interface HttpServerTransportpublic HttpStats stats()
HttpServerTransportstats in interface HttpServerTransportpublic org.jboss.netty.channel.Channel channel(Integer id)
channel in interface HttpServerTransportid - the channel IDpublic void forward(String websocketNodeAddress, Integer channelId, org.elasticsearch.common.xcontent.XContentBuilder builder)
forward in interface HttpServerTransportwebsocketNodeAddress - the websocket address of the other node, e.g.
"/10.0.0.1:9400"channelId - the channel ID on the other node for delivering the
messagebuilder - the builder for the messageCopyright © 2012–2014. All rights reserved.