Class JndiSrvInstanceDiscoveryService
java.lang.Object
dev.getelements.elements.rt.remote.JndiSrvInstanceDiscoveryService
- All Implemented Interfaces:
InstanceDiscoveryService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the known remote hosts.boolean
void
setAuthoritative
(boolean authoritative) void
setSrvQuery
(String srvQuery) void
setSrvServers
(String srvServers) void
start()
void
stop()
subscribeToDiscovery
(Consumer<InstanceHostInfo> instanceHostInfoConsumer) Subscribes to an event that fires when a new host joins the network.subscribeToUndiscovery
(Consumer<InstanceHostInfo> instanceHostInfoConsumer) Subscribes to an event that fires when a host leaves the network.
-
Field Details
-
SRV_AUTHORITATIVE
- See Also:
-
-
Constructor Details
-
JndiSrvInstanceDiscoveryService
public JndiSrvInstanceDiscoveryService()
-
-
Method Details
-
start
public void start()- Specified by:
start
in interfaceInstanceDiscoveryService
-
stop
public void stop()- Specified by:
stop
in interfaceInstanceDiscoveryService
-
subscribeToDiscovery
Description copied from interface:InstanceDiscoveryService
Subscribes to an event that fires when a new host joins the network.- Specified by:
subscribeToDiscovery
in interfaceInstanceDiscoveryService
- Parameters:
instanceHostInfoConsumer
- theInstanceHostInfo
- Returns:
- the
Subscription
-
subscribeToUndiscovery
Description copied from interface:InstanceDiscoveryService
Subscribes to an event that fires when a host leaves the network.- Specified by:
subscribeToUndiscovery
in interfaceInstanceDiscoveryService
- Parameters:
instanceHostInfoConsumer
- theInstanceHostInfo
- Returns:
- the
Subscription
-
getKnownHosts
Description copied from interface:InstanceDiscoveryService
Gets the known remote hosts.- Specified by:
getKnownHosts
in interfaceInstanceDiscoveryService
- Returns:
- a
Set<String>
containing the remote hosts
-
getSrvQuery
-
setSrvQuery
-
getSrvServers
-
setSrvServers
@Inject public void setSrvServers(@Named("dev.getelements.elements.rt.srv.servers") String srvServers) -
isAuthoritative
public boolean isAuthoritative() -
setAuthoritative
@Inject public void setAuthoritative(@Named("dev.getelements.elements.rt.srv.authoritative") boolean authoritative)
-