public class RouteAroundRegionEventRelay
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RouteAroundRegionEventRelay.Event
Underlying datatype representing the different event variants
for the route around region manager
|
static interface |
RouteAroundRegionEventRelay.RouteAroundRegionEventSubscriber
A subscriber that can be registered with the RouteAroundEventRelay
to react to events relevant to the route-around region manager
|
Constructor and Description |
---|
RouteAroundRegionEventRelay() |
Modifier and Type | Method and Description |
---|---|
void |
addRouteAroundRegionEventListener(RouteAroundRegionEventRelay.RouteAroundRegionEventSubscriber subscriber)
Register an event listener with the relay.
|
static RouteAroundRegionEventRelay |
getInstance() |
void |
onRegionAdded(Shape region)
Broadcast an event that a region was added to the manager.
|
void |
onRegionRemoved(Shape region)
Broadcast an event that a region was removed from the manager.
|
void |
onRouteAroundGeoFencesSet(boolean value)
Broadcast an event that the "route around geofences" option was set or unset.
|
boolean |
removeRouteAroundRegionEventListener(RouteAroundRegionEventRelay.RouteAroundRegionEventSubscriber subscriber)
Unregister an event listener with the relay.
|
public static RouteAroundRegionEventRelay getInstance()
public void addRouteAroundRegionEventListener(RouteAroundRegionEventRelay.RouteAroundRegionEventSubscriber subscriber)
subscriber
- The event listener to subscribe.public boolean removeRouteAroundRegionEventListener(RouteAroundRegionEventRelay.RouteAroundRegionEventSubscriber subscriber)
subscriber
- The event listener to unsubscribepublic void onRegionAdded(Shape region)
region
- the shape to add.public void onRegionRemoved(Shape region)
region
- the shape to remove.public void onRouteAroundGeoFencesSet(boolean value)