public final class DiscoveryGroup extends Object implements HornetQComponent
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.
Created 17 Nov 2008 13:21:45
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 HornetQComponent
Exception
public void internalRunning() throws Exception
Exception
public void stop()
stop
in interface HornetQComponent
public boolean isStarted()
isStarted
in interface HornetQComponent
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, a division of Red Hat. All Rights Reserved.