本文整理汇总了Java中org.opendaylight.yangtools.yang.model.api.SchemaContextListener类的典型用法代码示例。如果您正苦于以下问题:Java SchemaContextListener类的具体用法?Java SchemaContextListener怎么用?Java SchemaContextListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SchemaContextListener类属于org.opendaylight.yangtools.yang.model.api包,在下文中一共展示了SchemaContextListener类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerSchemaContextListener
import org.opendaylight.yangtools.yang.model.api.SchemaContextListener; //导入依赖的package包/类
@Override
public ListenerRegistration<SchemaContextListener> registerSchemaContextListener(
final SchemaContextListener listener) {
synchronized (lock) {
final ListenerRegistration<SchemaContextListener> reg = schemaService.registerSchemaContextListener(
listener);
final ListenerRegistration<SchemaContextListener> ret =
new AbstractListenerRegistration<SchemaContextListener>(listener) {
@Override
protected void removeRegistration() {
synchronized (lock) {
listeners.remove(this);
}
reg.close();
}
};
listeners.add(ret);
return ret;
}
}
示例2: registerSchemaContextListener
import org.opendaylight.yangtools.yang.model.api.SchemaContextListener; //导入依赖的package包/类
@Override
public ListenerRegistration<SchemaContextListener> registerSchemaContextListener(SchemaContextListener listener) {
ListenerRegistration<SchemaContextListener> registration = getDelegate().registerSchemaContextListener(listener);
addRegistration(registration);
return registration;
}
示例3: registerSchemaContextListener
import org.opendaylight.yangtools.yang.model.api.SchemaContextListener; //导入依赖的package包/类
@Override
public ListenerRegistration<SchemaContextListener> registerSchemaContextListener(
final SchemaContextListener listener) {
return listeners.register(listener);
}
示例4: changeSchema
import org.opendaylight.yangtools.yang.model.api.SchemaContextListener; //导入依赖的package包/类
public synchronized void changeSchema(final SchemaContext newContext) {
schemaContext = newContext;
for (ListenerRegistration<SchemaContextListener> listener : listeners) {
listener.getInstance().onGlobalContextUpdated(schemaContext);
}
}
示例5: registerInstance
import org.opendaylight.yangtools.yang.model.api.SchemaContextListener; //导入依赖的package包/类
/**
* Registers the given instance with the SchemaService as a SchemaContextListener.
*
* @param instance the BindingToNormalizedNodeCodec instance
* @param schemaService the SchemaService.
* @return the ListenerRegistration
*/
public static ListenerRegistration<SchemaContextListener> registerInstance(final BindingToNormalizedNodeCodec instance,
final DOMSchemaService schemaService) {
return schemaService.registerSchemaContextListener(instance);
}
示例6: registerSchemaContextListener
import org.opendaylight.yangtools.yang.model.api.SchemaContextListener; //导入依赖的package包/类
/**
* Register a listener for changes in schema context.
*
* @param listener Listener which should be registered
* @return Listener registration handle
*/
@Override
ListenerRegistration<SchemaContextListener> registerSchemaContextListener(SchemaContextListener listener);