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
- Exception
public void start() throws Exception
start
in interface ActiveMQComponent
Exception
public void internalRunning() throws Exception
Exception
public void stop()
stop
in interface ActiveMQComponent
public boolean isStarted()
isStarted
in interface ActiveMQComponent
public String getName()
public List<DiscoveryEntry> getDiscoveryEntries()
public boolean waitForBroadcast(long timeout)
public void registerListener(DiscoveryListener listener)
public void unregisterListener(DiscoveryListener listener)
Copyright © 2017 JBoss by Red Hat. All rights reserved.