public abstract class AbstractRegionMonitor<T extends RegionDecorator,E extends Packet> extends java.lang.Object implements RegionMonitor<T,E>
Constructor and Description |
---|
AbstractRegionMonitor(SystemTime timer) |
Modifier and Type | Method and Description |
---|---|
void |
add(T region) |
void |
clear() |
protected abstract void |
invokeEnterRegionCallbacks(T regionDecorator,
BeaconServiceMessenger messenger) |
protected abstract void |
invokeExitRegionCallbacks(T regionDecorator,
BeaconServiceMessenger messenger) |
boolean |
isActive() |
boolean |
isInsideAnyRegion() |
protected abstract boolean |
isPacketInRegion(E packet,
T regionDecorator) |
void |
processEnteredRegions(E packet,
BeaconServiceMessenger messenger) |
protected abstract void |
processFoundPacketsInRegion(T regionDecorator,
java.util.Set<E> packets) |
void |
processNewScanCycle(java.util.List<E> singleScan,
BeaconServiceMessenger messenger) |
boolean |
removeByRegionId(java.lang.String regionId) |
void |
setRegionExitExpiration(long period) |
public void add(T region)
add
in interface RegionMonitor<T extends RegionDecorator,E extends Packet>
public boolean isActive()
isActive
in interface RegionMonitor<T extends RegionDecorator,E extends Packet>
public boolean removeByRegionId(java.lang.String regionId)
removeByRegionId
in interface RegionMonitor<T extends RegionDecorator,E extends Packet>
public boolean isInsideAnyRegion()
isInsideAnyRegion
in interface RegionMonitor<T extends RegionDecorator,E extends Packet>
public void processNewScanCycle(java.util.List<E> singleScan, BeaconServiceMessenger messenger)
processNewScanCycle
in interface RegionMonitor<T extends RegionDecorator,E extends Packet>
public void processEnteredRegions(E packet, BeaconServiceMessenger messenger)
processEnteredRegions
in interface RegionMonitor<T extends RegionDecorator,E extends Packet>
public void setRegionExitExpiration(long period)
setRegionExitExpiration
in interface RegionMonitor<T extends RegionDecorator,E extends Packet>
public void clear()
clear
in interface RegionMonitor<T extends RegionDecorator,E extends Packet>
protected abstract void processFoundPacketsInRegion(T regionDecorator, java.util.Set<E> packets)
protected abstract void invokeEnterRegionCallbacks(T regionDecorator, BeaconServiceMessenger messenger)
protected abstract void invokeExitRegionCallbacks(T regionDecorator, BeaconServiceMessenger messenger)