public abstract class MulticastChannel extends Object implements Closeable
| Modifier and Type | Class and Description |
|---|---|
static class |
MulticastChannel.Config
Config of multicast channel.
|
static interface |
MulticastChannel.Listener
Listener that gets called when data is received on the multicast channel.
|
static class |
MulticastChannel.MultiListener
Simple listener that wraps multiple listeners into one.
|
| Modifier and Type | Field and Description |
|---|---|
protected MulticastChannel.Listener |
listener |
static String |
SHARED_CHANNEL_NAME |
| Modifier | Constructor and Description |
|---|---|
protected |
MulticastChannel(MulticastChannel.Listener listener) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the channel.
|
protected abstract void |
close(MulticastChannel.Listener listener) |
static MulticastChannel |
getChannel(String name,
boolean shared,
MulticastChannel.Config config,
MulticastChannel.Listener listener)
Builds a channel based on the provided config, allowing to control if sharing a channel that uses
the same config is allowed or not.
|
abstract void |
send(BytesReference data)
Send the data over the multicast channel.
|
protected final MulticastChannel.Listener listener
public static final String SHARED_CHANNEL_NAME
protected MulticastChannel(MulticastChannel.Listener listener)
public static MulticastChannel getChannel(String name, boolean shared, MulticastChannel.Config config, MulticastChannel.Listener listener) throws Exception
Exceptionpublic abstract void send(BytesReference data) throws Exception
Exceptionpublic void close()
close in interface Closeableclose in interface AutoCloseableprotected abstract void close(MulticastChannel.Listener listener)
Copyright © 2009–2016. All rights reserved.