@Override public ConsumerSession registerConsumer(Consumer consumer) { ConsumerSession realSession = broker.registerConsumer(new ConsumerWrapper(consumer)); AuthzConsumerContextImpl authzConsumerContext = new AuthzConsumerContextImpl(realSession, this); consumer.onSessionInitiated(authzConsumerContext); return authzConsumerContext; }
@Override public ConsumerSession registerConsumer(Consumer consumer, BundleContext bundleContext) { ConsumerSession realSession = broker.registerConsumer(new ConsumerWrapper(consumer), bundleContext); AuthzConsumerContextImpl authzConsumerContext = new AuthzConsumerContextImpl(realSession, this); consumer.onSessionInitiated(authzConsumerContext); return authzConsumerContext; }
@Override public java.lang.AutoCloseable createInstance() { final DOMDataBroker dataBroker = getDomBrokerDependency() .registerConsumer(new NoopDOMConsumer()).getService(DOMDataBroker.class); final DOMNotificationService notifyService = getDomBrokerDependency() .registerConsumer(new NoopDOMConsumer()) .getService(DOMNotificationService.class); return new AmqpUserAgentFactory(dataBroker, notifyService); } }
@Override public java.lang.AutoCloseable createInstance() { final MdsalNetconfOperationServiceFactory mdsalNetconfOperationServiceFactory = new MdsalNetconfOperationServiceFactory(getRootSchemaServiceDependency()) { @Override public void close() throws Exception { super.close(); getMapperAggregatorDependency().onRemoveNetconfOperationServiceFactory(this); } }; getDomBrokerDependency().registerConsumer(mdsalNetconfOperationServiceFactory); getMapperAggregatorDependency().onAddNetconfOperationServiceFactory(mdsalNetconfOperationServiceFactory); return mdsalNetconfOperationServiceFactory; }
@Override public java.lang.AutoCloseable createInstance() { final ProviderContext bindingCtx = getBrokerDependency().registerProvider(new Providers.BindingAware()); final RpcProviderRegistry rpcRegistry = bindingCtx.getSALService(RpcProviderRegistry.class); final DOMNotificationService notifyService = getDomBrokerDependency() .registerConsumer(new NoopDOMConsumer()) .getService(DOMNotificationService.class); final File outputFile = new File(getOutputFileName()); UserAgent ua = UserAgent.create(notifyService,rpcRegistry, outputFile); if(ua != null){ LOG.info("HweventsourceUagent has been initialized"); } else { LOG.error("HweventsourceUagent has not been initialized"); } return ua; }
@Override public java.lang.AutoCloseable createInstance() { final MdsalNetconfOperationServiceFactory mdsalNetconfOperationServiceFactory = new MdsalNetconfOperationServiceFactory(getRootSchemaServiceDependency(), getRootSchemaSourceProviderDependency()) { @Override public void close() throws Exception { super.close(); getMapperAggregatorDependency().onRemoveNetconfOperationServiceFactory(this); } }; getDomBrokerDependency().registerConsumer(mdsalNetconfOperationServiceFactory); getMapperAggregatorDependency().onAddNetconfOperationServiceFactory(mdsalNetconfOperationServiceFactory); return mdsalNetconfOperationServiceFactory; }