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, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected 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)
HttpServerTransport
httpServerAdapter
in interface HttpServerTransport
public void webSocketServerAdapter(WebSocketServerAdapter webSocketServerAdapter)
HttpServerTransport
webSocketServerAdapter
in interface HttpServerTransport
protected void doStart() throws org.elasticsearch.ElasticsearchException
doStart
in class org.elasticsearch.common.component.AbstractLifecycleComponent<HttpServerTransport>
org.elasticsearch.ElasticsearchException
protected void doStop() throws org.elasticsearch.ElasticsearchException
doStop
in class org.elasticsearch.common.component.AbstractLifecycleComponent<HttpServerTransport>
org.elasticsearch.ElasticsearchException
protected void doClose() throws org.elasticsearch.ElasticsearchException
doClose
in class org.elasticsearch.common.component.AbstractLifecycleComponent<HttpServerTransport>
org.elasticsearch.ElasticsearchException
public org.elasticsearch.common.transport.BoundTransportAddress boundAddress()
HttpServerTransport
boundAddress
in interface HttpServerTransport
public HttpInfo info()
info
in interface HttpServerTransport
public HttpStats stats()
HttpServerTransport
stats
in interface HttpServerTransport
public org.jboss.netty.channel.Channel channel(Integer id)
channel
in interface HttpServerTransport
id
- the channel IDpublic void forward(String websocketNodeAddress, Integer channelId, org.elasticsearch.common.xcontent.XContentBuilder builder)
forward
in interface HttpServerTransport
websocketNodeAddress
- 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.