• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java CallbackRegistry类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.hivemq.spi.callback.registry.CallbackRegistry的典型用法代码示例。如果您正苦于以下问题:Java CallbackRegistry类的具体用法?Java CallbackRegistry怎么用?Java CallbackRegistry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CallbackRegistry类属于com.hivemq.spi.callback.registry包,在下文中一共展示了CallbackRegistry类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: before

import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
@Before
public void before() {
    MockitoAnnotations.initMocks(this);

    final HashSet<Callback> callbackValues = new HashSet<Callback>();
    callbackValues.add(new Callback() {
    });
    when(registry.getAllCallbacks()).thenReturn(callbackValues);
    injector = Guice.createInjector(new AbstractModule() {
        @Override
        protected void configure() {
            bind(CallbackRegistry.class).toInstance(registry);

            bind(String.class).toInstance("testString");
        }
    });

}
 
开发者ID:hivemq,项目名称:hivemq-spi,代码行数:19,代码来源:PluginEntryPointTest.java


示例2: postConstruct

import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
/**
 * This method is executed after the instanciation of the whole class. It is used to initialize
 * the implemented callbacks and make them known to the HiveMQ core.
 */
@PostConstruct
public void postConstruct() {

    CallbackRegistry callbackRegistry = getCallbackRegistry();
    callbackRegistry.addCallback(discoveryCallback);

}
 
开发者ID:hivemq,项目名称:s3-cluster-discovery-plugin,代码行数:12,代码来源:S3DiscoveryPluginEntryPoint.java


示例3: postConstruct

import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
/**
 * This method is executed after the instanciation of the whole class. It is used to initialize
 * the implemented callbacks and make them known to the HiveMQ core.
 */
@PostConstruct
public void postConstruct() {
    CallbackRegistry callbackRegistry = getCallbackRegistry();
    KafkaPush push = new KafkaPush();
    callbackRegistry.addCallback(push);
}
 
开发者ID:sabarishs,项目名称:hivemq-kafka-plugin,代码行数:11,代码来源:KafkaPluginMain.java


示例4: postConstruct

import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
@PostConstruct
public void postConstruct() {

    CallbackRegistry callbackRegistry = getCallbackRegistry();
    callbackRegistry.addCallback(nextAuthorisation);
    callbackRegistry.addCallback(blacklistAuthorisation); //Register blacklist or whitelist authorisation here
}
 
开发者ID:hivemq,项目名称:hivemq-authorization-blacklist-whitelist-example,代码行数:8,代码来源:BlackAndWhitelistExampleMainClass.java


示例5: postConstruct

import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
/**
 * This method is executed after the instanciation of the whole class. It is used to initialize
 * the implemented callbacks and make them known to the HiveMQ core.
 */
@PostConstruct
public void postConstruct() {

    CallbackRegistry callbackRegistry = getCallbackRegistry();
    callbackRegistry.addCallback(hiveMQStart);
    callbackRegistry.addCallback(clientConnect);
    callbackRegistry.addCallback(clientDisconnect);
    callbackRegistry.addCallback(publishReceived);
    callbackRegistry.addCallback(simpleScheduledCallback);
    callbackRegistry.addCallback(scheduledClearRetainedCallback);
    callbackRegistry.addCallback(addSubscriptionOnClientConnect);
    callbackRegistry.addCallback(sendListOfAllClientsOnPublish);

}
 
开发者ID:hivemq,项目名称:hivemq-hello-world-plugin,代码行数:19,代码来源:HelloWorldMainClass.java


示例6: postConstruct

import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
@PostConstruct
public void postConstruct() {
    CallbackRegistry callbackRegistry = getCallbackRegistry();
    callbackRegistry.addCallback(clientStatusService);
}
 
开发者ID:artcom,项目名称:hivemq-client-status-plugin,代码行数:6,代码来源:ClientStatusMainClass.java


示例7: postConstruct

import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
/**
 * This method is executed after the instanciation of the whole class. It is used to initialize
 * the implemented callbacks and make them known to the HiveMQ core.
 */
@PostConstruct
public void postConstruct() {
    CallbackRegistry callbackRegistry = getCallbackRegistry();
    callbackRegistry.addCallback(authorizationCallback);
}
 
开发者ID:hivemq,项目名称:hivemq-authorization-example,代码行数:10,代码来源:AuthorizationExampleMainClass.java


示例8: TestHiveMQPluginEntryPointWithConstructorInjection

import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
@Inject
public TestHiveMQPluginEntryPointWithConstructorInjection(String paramter, final CallbackRegistry callbackRegistry2) {
    this.paramter = paramter;
    this.callbackRegistry2 = callbackRegistry2;
}
 
开发者ID:hivemq,项目名称:hivemq-spi,代码行数:6,代码来源:PluginEntryPointTest.java


示例9: getCallbackRegistry2

import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
public CallbackRegistry getCallbackRegistry2() {
    return callbackRegistry2;
}
 
开发者ID:hivemq,项目名称:hivemq-spi,代码行数:4,代码来源:PluginEntryPointTest.java


示例10: postConstruct

import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
@PostConstruct
public void postConstruct() {

    CallbackRegistry callbackRegistry = getCallbackRegistry();

    callbackRegistry.addCallback(authorizationCallback);
    callbackRegistry.addCallback(clientConnectCallback);

}
 
开发者ID:hivemq,项目名称:x509-client-cert-hivemq-example-plugin,代码行数:10,代码来源:X509ClientCertEntryPoint.java


示例11: postConstruct

import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
@PostConstruct
public void postConstruct() {

    final CallbackRegistry callbackRegistry = getCallbackRegistry();

    callbackRegistry.addCallback(persistMessagesCallback);
    callbackRegistry.addCallback(shutdownCallback);
    callbackRegistry.addCallback(dbAuthenticationCallback);

}
 
开发者ID:hivemq,项目名称:hivemq-database-example-plugin,代码行数:11,代码来源:DatabaseExamplePlugin.java


示例12: test_setter_injection_working

import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
@Test
public void test_setter_injection_working() throws Exception {


    final TestHiveMQPluginEntryPoint instance = injector.getInstance(TestHiveMQPluginEntryPoint.class);

    final CallbackRegistry callbackRegistry = instance.getCallbackRegistry();
    assertNotNull(callbackRegistry);

    assertEquals(1, callbackRegistry.getAllCallbacks().size());
}
 
开发者ID:hivemq,项目名称:hivemq-spi,代码行数:12,代码来源:PluginEntryPointTest.java


示例13: setCallbackRegistry

import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
/**
 * You should never call this method by your own except
 * for testing purposes.
 *
 * @param callbackRegistry the callback Registry object
 */
@Inject
final void setCallbackRegistry(final CallbackRegistry callbackRegistry) {

    this.callbackRegistry = callbackRegistry;
}
 
开发者ID:hivemq,项目名称:hivemq-spi,代码行数:12,代码来源:PluginEntryPoint.java


示例14: getCallbackRegistry

import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
/**
 * Returns global Callback registry
 *
 * @return the global Callback Registry
 */
public CallbackRegistry getCallbackRegistry() {
    return callbackRegistry;
}
 
开发者ID:hivemq,项目名称:hivemq-spi,代码行数:9,代码来源:PluginEntryPoint.java


示例15: FileAuthMain

import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
/**
 * Inject callback class and callback registry
 * <p/>
 * Injection of callback registry was favoured against {@link com.hivemq.plugin.fileauthentication.FileAuthMain#getCallbackRegistry()}
 * because then it can be replaced in testing.
 *
 * @param fileAuthenticator implementation of OnAuthenticationCallback
 * @param callbackRegistry  callback registry
 */
@Inject
public FileAuthMain(final FileAuthenticator fileAuthenticator, final CallbackRegistry callbackRegistry) {
    this.fileAuthenticator = fileAuthenticator;
    this.callbackRegistry = callbackRegistry;
}
 
开发者ID:hivemq,项目名称:file-auth-plugin,代码行数:15,代码来源:FileAuthMain.java



注:本文中的com.hivemq.spi.callback.registry.CallbackRegistry类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java UmbrellaException类代码示例发布时间:2022-05-22
下一篇:
Java Configuration类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap