com.ziqni.admin.sdk.ZiqniAdminSDKEventBus Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ziqni-admin-sdk Show documentation
Show all versions of ziqni-admin-sdk Show documentation
ZIQNI Admin SDK Java Client
package com.ziqni.admin.sdk;
import com.google.common.eventbus.DeadEvent;
import com.google.common.eventbus.EventBus;
public class ZiqniAdminSDKEventBus {
public final EventBus managementEventBus;
public ZiqniAdminSDKEventBus() {
this.managementEventBus = new EventBus();
}
/**
* Posts an event to all registered subscribers. This method will return successfully after the
* event has been posted to all subscribers, and regardless of any exceptions thrown by
* subscribers.
*
* If no subscribers have been subscribed for {@code event}'s class, and {@code event} is not
* already a {@link DeadEvent}, it will be wrapped in a DeadEvent and reposted.
*
* @param event event to post.
*/
public void post(Object event) {
this.managementEventBus.post(event);
}
/**
* Registers all subscriber methods on {@code object} to receive events.
*
* @param object object whose subscriber methods should be registered.
*/
public void register(Object object) {
this.managementEventBus.register(object);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy