@Service public class EvpnRouteManager extends Object implements EvpnRouteService, EvpnRouteAdminService
| Modifier and Type | Field and Description |
|---|---|
protected EvpnRouteStore |
evpnRouteStore |
| Constructor and Description |
|---|
EvpnRouteManager() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate() |
void |
addListener(EvpnRouteListener listener) |
protected void |
deactivate() |
Collection<EvpnRouteTableId> |
getRouteTables()
Returns the set of route tables in the system.
|
void |
removeListener(EvpnRouteListener listener) |
void |
update(Collection<EvpnRoute> routes)
Updates the given routes in the route service.
|
void |
withdraw(Collection<EvpnRoute> routes)
Withdraws the given routes from the route service.
|
@Reference(cardinality=MANDATORY_UNARY) protected EvpnRouteStore evpnRouteStore
@Activate protected void activate()
@Deactivate protected void deactivate()
public void addListener(EvpnRouteListener listener)
In a departure from other services in ONOS, calling addListener will cause all current routes to be pushed to the listener before any new events are sent. This allows a listener to easily get the exact set of routes without worrying about missing any.
addListener in interface org.onosproject.event.ListenerService<EvpnRouteEvent,EvpnRouteListener>listener - listener to be addedpublic void removeListener(EvpnRouteListener listener)
removeListener in interface org.onosproject.event.ListenerService<EvpnRouteEvent,EvpnRouteListener>public Collection<EvpnRouteTableId> getRouteTables()
EvpnRouteServicegetRouteTables in interface EvpnRouteServicepublic void update(Collection<EvpnRoute> routes)
EvpnRouteAdminServiceupdate in interface EvpnRouteAdminServiceroutes - collection of routes to updatepublic void withdraw(Collection<EvpnRoute> routes)
EvpnRouteAdminServicewithdraw in interface EvpnRouteAdminServiceroutes - collection of routes to withdraw