本文整理汇总了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;未经允许,请勿转载。 |
请发表评论