public class AnnounceGroupChannel extends Object
send(ByteBuffer)
or receive(ByteBuffer)
results in an exception,
then the caller can call closeQuietly()
and retry the original operation, which will result in the creation of a new channel.Constructor and Description |
---|
AnnounceGroupChannel(AnnounceGroup group,
Selector selector,
Collection<NetworkInterface> networkInterfaces) |
Modifier and Type | Method and Description |
---|---|
void |
closeQuietly() |
AnnounceGroup |
getGroup() |
SocketAddress |
receive(ByteBuffer buffer) |
void |
send(ByteBuffer buffer) |
void |
shutdown()
Close currently opened channel if present and prevent creation of new channels.
|
public AnnounceGroupChannel(AnnounceGroup group, Selector selector, Collection<NetworkInterface> networkInterfaces)
group
- Target announce groupselector
- Selector to use for opening local channelnetworkInterfaces
- Network interfaces, on which to listen to incoming messagespublic AnnounceGroup getGroup()
public void send(ByteBuffer buffer) throws IOException
IOException
public SocketAddress receive(ByteBuffer buffer) throws IOException
IOException
public void shutdown()
public void closeQuietly()
Copyright © 2016–2021. All rights reserved.