Package io.keikai.model.impl
Class EventListenerAdaptorFactory
java.lang.Object
io.keikai.model.impl.EventListenerAdaptorFactory
Factory for creating
EventListenerAdaptor instances.
When ZK is on the classpath, creates EventQueueListenerAdaptor for UI event dispatch.
When ZK is not available (headless mode), falls back to DirectEventListenerAdaptor.
- Since:
- 7.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic EventListenerAdaptorcreateQueueAdaptor(String scope, String bookId) Creates a queue-based listener adaptor (for UI event dispatch).static booleanReturns whether ZK event queue is available on the classpath.
-
Constructor Details
-
EventListenerAdaptorFactory
public EventListenerAdaptorFactory()
-
-
Method Details
-
createQueueAdaptor
Creates a queue-based listener adaptor (for UI event dispatch). Falls back toDirectEventListenerAdaptorif ZK is not on the classpath.- Parameters:
scope- the event queue scope (e.g. "desktop", "session", "application")bookId- the book identifier used as part of the queue name- Returns:
- an
EventListenerAdaptorinstance
-
isZkAvailable
public static boolean isZkAvailable()Returns whether ZK event queue is available on the classpath.- Returns:
trueif ZK EventQueues can be used,falseotherwise
-