@Singleton public class MulticastRegistryDiscoverer extends Object implements IRegistryDiscoverer, com.airepublic.multicast.IMulticastMessageHandler, Closeable
| Modifier and Type | Field and Description |
|---|---|
static String |
ANNOUNCE_REGISTRY_ALL |
static String |
REQUEST_REGISTRY_ALL |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static MulticastRegistryDiscoverer |
create(RegistryCache registryCache)
Creates a new instance by defining the
RegistryCache.NOTE: This is for standalone use when not in a CDI context. |
void |
handle(InetAddress fromHost,
int fromPort,
byte[] data) |
void |
requestRegistries()
Locates all registries and puts them in the mutually used
RegistryCache. |
protected void |
send(String type,
byte[] message)
Sends the message of the specified type to the multicast socket.
|
public static final String REQUEST_REGISTRY_ALL
public static final String ANNOUNCE_REGISTRY_ALL
public static MulticastRegistryDiscoverer create(RegistryCache registryCache)
RegistryCache.registryCache - public void requestRegistries()
IRegistryDiscovererRegistryCache.requestRegistries in interface IRegistryDiscovererpublic void handle(InetAddress fromHost, int fromPort, byte[] data)
handle in interface com.airepublic.multicast.IMulticastMessageHandlerprotected void send(String type, byte[] message) throws ServiceException
type - the type of messagemessage - the message dataServiceException@PreDestroy public void close()
close in interface IRegistryDiscovererclose in interface Closeableclose in interface AutoCloseableCopyright © 2016. All rights reserved.