public class LeaseTimeHandler
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected DiscoveryAgent |
agent
The state.
|
protected java.util.Map<jadex.bridge.IComponentIdentifier,DiscoveryEntry> |
entries
The entries.
|
protected double |
factor
The timeout factor.
|
protected java.util.Timer |
timer
The timer.
|
Constructor and Description |
---|
LeaseTimeHandler(DiscoveryAgent state)
Create a new lease time handling object.
|
LeaseTimeHandler(DiscoveryAgent agent,
double factor)
Create a new lease time handling object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addOrUpdateEntry(DiscoveryEntry entry)
Add a new entry or update an existing entry.
|
void |
dispose()
Release all resources.
|
protected void |
doWaitFor(long delay,
jadex.bridge.IComponentStep<?> step)
Overriden wait for to not use platform clock.
|
void |
entryDeleted(DiscoveryEntry entry)
Called when an entry has been deleted.
|
protected long |
getClockTime()
Get the current time.
|
DiscoveryEntry[] |
getEntries()
Get all entries.
|
void |
startRemoveBehavior()
Start removing discovered proxies.
|
protected DiscoveryAgent agent
protected java.util.Map<jadex.bridge.IComponentIdentifier,DiscoveryEntry> entries
protected java.util.Timer timer
protected double factor
public LeaseTimeHandler(DiscoveryAgent state)
public LeaseTimeHandler(DiscoveryAgent agent, double factor)
public boolean addOrUpdateEntry(DiscoveryEntry entry)
entry
- The entry.public DiscoveryEntry[] getEntries()
public void startRemoveBehavior()
protected void doWaitFor(long delay, jadex.bridge.IComponentStep<?> step)
protected long getClockTime()
public void entryDeleted(DiscoveryEntry entry)
public void dispose()