public class NettyDatagramServer<IN,OUT> extends DatagramServer<IN,OUT>
DatagramServer
implementation built on Netty.started
Constructor and Description |
---|
NettyDatagramServer(Environment env,
Dispatcher dispatcher,
InetSocketAddress listenAddress,
NetworkInterface multicastInterface,
ServerSocketOptions options,
Codec<Buffer,IN,OUT> codec) |
Modifier and Type | Method and Description |
---|---|
protected void |
bindChannel(ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> handler,
Object _ioChannel) |
protected Promise<Void> |
doShutdown() |
protected Promise<Void> |
doStart(ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> channelHandler) |
Promise<Void> |
join(InetAddress multicastAddress,
NetworkInterface iface)
Join a multicast group.
|
Promise<Void> |
leave(InetAddress multicastAddress,
NetworkInterface iface)
Leave a multicast group.
|
getListenAddress, getMulticastInterface, getOptions, join, leave
getDefaultCodec, getDefaultDispatcher, getDefaultEnvironment, getDefaultPrefetchSize, shutdown, start
public NettyDatagramServer(@Nonnull Environment env, @Nonnull Dispatcher dispatcher, @Nullable InetSocketAddress listenAddress, @Nullable NetworkInterface multicastInterface, @Nonnull ServerSocketOptions options, @Nullable Codec<Buffer,IN,OUT> codec)
protected Promise<Void> doStart(ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> channelHandler)
doStart
in class ReactorPeer<IN,OUT,ChannelStream<IN,OUT>>
protected Promise<Void> doShutdown()
doShutdown
in class ReactorPeer<IN,OUT,ChannelStream<IN,OUT>>
public Promise<Void> join(InetAddress multicastAddress, NetworkInterface iface)
DatagramServer
join
in class DatagramServer<IN,OUT>
multicastAddress
- multicast address of the group to joiniface
- interface to use for multicastPromise
that will be complete when the group has been joinedpublic Promise<Void> leave(InetAddress multicastAddress, NetworkInterface iface)
DatagramServer
leave
in class DatagramServer<IN,OUT>
multicastAddress
- multicast address of the group to leaveiface
- interface to use for multicastPromise
that will be complete when the group has been leftprotected void bindChannel(ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> handler, Object _ioChannel)
Copyright © 2016. All rights reserved.