本文整理汇总了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");
}
});
}
示例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);
}
示例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);
}
示例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);
}
示例6: postConstruct
import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
@PostConstruct
public void postConstruct() {
CallbackRegistry callbackRegistry = getCallbackRegistry();
callbackRegistry.addCallback(clientStatusService);
}
示例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);
}
示例8: TestHiveMQPluginEntryPointWithConstructorInjection
import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
@Inject
public TestHiveMQPluginEntryPointWithConstructorInjection(String paramter, final CallbackRegistry callbackRegistry2) {
this.paramter = paramter;
this.callbackRegistry2 = callbackRegistry2;
}
示例9: getCallbackRegistry2
import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
public CallbackRegistry getCallbackRegistry2() {
return callbackRegistry2;
}
示例10: postConstruct
import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
@PostConstruct
public void postConstruct() {
CallbackRegistry callbackRegistry = getCallbackRegistry();
callbackRegistry.addCallback(authorizationCallback);
callbackRegistry.addCallback(clientConnectCallback);
}
示例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);
}
示例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());
}
示例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;
}
示例14: getCallbackRegistry
import com.hivemq.spi.callback.registry.CallbackRegistry; //导入依赖的package包/类
/**
* Returns global Callback registry
*
* @return the global Callback Registry
*/
public CallbackRegistry getCallbackRegistry() {
return callbackRegistry;
}
示例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;
}