本文整理汇总了Java中org.onosproject.incubator.net.tunnel.TunnelEvent类的典型用法代码示例。如果您正苦于以下问题:Java TunnelEvent类的具体用法?Java TunnelEvent怎么用?Java TunnelEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TunnelEvent类属于org.onosproject.incubator.net.tunnel包,在下文中一共展示了TunnelEvent类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deleteTunnel
import org.onosproject.incubator.net.tunnel.TunnelEvent; //导入依赖的package包/类
@Override
public void deleteTunnel(TunnelId tunnelId) {
Tunnel deletedTunnel = tunnelIdAsKeyStore.get(tunnelId);
if (deletedTunnel == null) {
return;
}
tunnelIdAsKeyStore.remove(tunnelId);
TunnelEvent event = new TunnelEvent(TunnelEvent.Type.TUNNEL_REMOVED,
deletedTunnel);
notifyDelegate(event);
}
示例2: activate
import org.onosproject.incubator.net.tunnel.TunnelEvent; //导入依赖的package包/类
@Activate
public void activate() {
store.setDelegate(delegate);
eventDispatcher.addSink(TunnelEvent.class, listenerRegistry);
log.info("Started");
}
示例3: deactivate
import org.onosproject.incubator.net.tunnel.TunnelEvent; //导入依赖的package包/类
@Deactivate
public void deactivate() {
store.unsetDelegate(delegate);
eventDispatcher.removeSink(TunnelEvent.class);
log.info("Stopped");
}
示例4: notify
import org.onosproject.incubator.net.tunnel.TunnelEvent; //导入依赖的package包/类
@Override
public void notify(TunnelEvent event) {
if (event != null) {
post(event);
}
}