public interface DiscoveryAgent
Modifier and Type | Method and Description |
---|---|
void |
close()
Stops the agent after which no new remote peers will be found.
|
boolean |
isSchedulerRequired()
Indicates if this DiscoveryAgent requires a ScheduledExecutorService in order
to perform its discovery work.
|
void |
resume()
Resumes discovery by this agent if it was previously suspended.
|
void |
setDiscoveryListener(DiscoveryListener listener)
Sets the discovery listener
|
void |
setScheduler(ScheduledExecutorService scheduler)
Provider a ScheduledExecutorService to the DiscoveryAgent that requires a
scheduler to perform its discovery work.
|
void |
start()
Starts the agent after which new remote peers can start to be found.
|
void |
suspend()
Suspends the Agent which suppresses any new attempts to discover remote
peers until the agent is resumed.
|
boolean isSchedulerRequired()
void setScheduler(ScheduledExecutorService scheduler)
scheduler
- An initialized Scheduler service that this agent can use for its work.void setDiscoveryListener(DiscoveryListener listener)
listener
- the listener to notify on discovery events, or null to clear.void start() throws IOException, IllegalStateException
IOException
- if an IO error occurs while starting the agent.IllegalStateException
- if the agent is not properly configured.void close()
void suspend()
void resume()
Copyright © 2013–2016 The Apache Software Foundation. All rights reserved.