public final class DiscoveryGroup extends Object implements ActiveMQComponent
BroadcastEndpoint.
There are two current implementations, and that's probably all we will ever need.
We will probably keep both interfaces for a while as UDP is a simple solution requiring no extra dependencies which
is suitable for users looking for embedded solutions.| Constructor and Description |
|---|
DiscoveryGroup(String nodeID,
String name,
long timeout,
BroadcastEndpointFactory endpointFactory,
NotificationService service)
This is the main constructor, intended to be used
|
| Modifier and Type | Method and Description |
|---|---|
List<DiscoveryEntry> |
getDiscoveryEntries() |
String |
getName() |
void |
internalRunning()
This will start the DiscoveryRunnable and run it directly.
|
boolean |
isStarted() |
void |
registerListener(DiscoveryListener listener) |
void |
start() |
void |
stop() |
void |
unregisterListener(DiscoveryListener listener) |
boolean |
waitForBroadcast(long timeout) |
public DiscoveryGroup(String nodeID, String name, long timeout, BroadcastEndpointFactory endpointFactory, NotificationService service) throws Exception
nodeID - name - timeout - endpointFactory - service - Exceptionpublic void start()
throws Exception
start in interface ActiveMQComponentExceptionpublic void internalRunning()
throws Exception
Exceptionpublic void stop()
stop in interface ActiveMQComponentpublic boolean isStarted()
isStarted in interface ActiveMQComponentpublic String getName()
public List<DiscoveryEntry> getDiscoveryEntries()
public boolean waitForBroadcast(long timeout)
public void registerListener(DiscoveryListener listener)
public void unregisterListener(DiscoveryListener listener)
Copyright © 2018 JBoss by Red Hat. All rights reserved.