public class AsyncEventBusRegistry
Registry for managing asynceventbus registration. Provides methods to register and query asynceventbus items.
java.lang.Object > AsyncEventBusRegistry
Field Summary
before
Field before.
future
Field future.
asyncEventConsumerMap
Field asyncEventConsumerMap.
k
Field k.
eventMap
Field eventMap.
eventConsumer
Field eventConsumer.
consumers
Field consumers.
after
Field after.
registry
Field registry.
beforeGlobal
Field beforeGlobal.
Method Detail
AsyncEventBusRegistry
public
AsyncEventBusRegistry
(@Nonnull final HytaleLogger logger, @Nonnull final Class eventClass)
Method AsyncEventBusRegistry.
- Parameters:
@Nonnull final HytaleLoggerlogger@Nonnull final ClasseventClass
AsyncEventConsumerMap
new
AsyncEventConsumerMap
(null)
Method AsyncEventConsumerMap.
- Parameters:
nullnull
registerAsync
EventType>
registerAsync
(final short priority, @Nonnull final KeyType key, @Nonnull final Function, CompletableFuture> function)
Method registerAsync.
- Parameters:
final shortpriority@Nonnull final KeyTypekey@Nonnull final Functionfunction, CompletableFuture >
registerAsync0
EventType>
registerAsync0
(final short priority, @Nullable final KeyType key, @Nonnull final Function, CompletableFuture> function, @Nonnull final String consumerString)
Method registerAsync0.
- Parameters:
final shortpriority@Nullable final KeyTypekey@Nonnull final Functionfunction, CompletableFuture > @Nonnull final StringconsumerString
unregister
void
unregister
(@Nullable final KeyType key, @Nonnull final AsyncEventConsumer consumer)
Method unregister.
- Parameters:
@Nullable final KeyTypekey@Nonnull final AsyncEventConsumerconsumer
registerAsyncGlobal
EventType>
registerAsyncGlobal
(final short priority, @Nonnull final Function, CompletableFuture> function)
Method registerAsyncGlobal.
- Parameters:
final shortpriority@Nonnull final Functionfunction, CompletableFuture >
registerAsyncGlobal0
EventType>
registerAsyncGlobal0
(final short priority, @Nonnull final Function, CompletableFuture> function, @Nonnull final String consumerString)
Method registerAsyncGlobal0.
- Parameters:
final shortpriority@Nonnull final Functionfunction, CompletableFuture > @Nonnull final StringconsumerString
unregisterGlobal
void
unregisterGlobal
(@Nonnull final AsyncEventConsumer consumer)
Method unregisterGlobal.
- Parameters:
@Nonnull final AsyncEventConsumerconsumer
registerAsyncUnhandled
EventType>
registerAsyncUnhandled
(final short priority, @Nonnull final Function, CompletableFuture> function)
Method registerAsyncUnhandled.
- Parameters:
final shortpriority@Nonnull final Functionfunction, CompletableFuture >
registerAsyncUnhandled0
EventType>
registerAsyncUnhandled0
(final short priority, @Nonnull final Function, CompletableFuture> function, @Nonnull final String consumerString)
Method registerAsyncUnhandled0.
- Parameters:
final shortpriority@Nonnull final Functionfunction, CompletableFuture > @Nonnull final StringconsumerString
unregisterUnhandled
void
unregisterUnhandled
(@Nonnull final AsyncEventConsumer consumer)
Method unregisterUnhandled.
- Parameters:
@Nonnull final AsyncEventConsumerconsumer
dispatchGlobal
CompletableFuture
dispatchGlobal
(@Nonnull final CompletableFuture future)
Method dispatchGlobal.
- Parameters:
@Nonnull final CompletableFuturefuture
event
dispatch
event
(global)
Method event.
- Parameters:
globalglobal
dispatchUnhandled
CompletableFuture
dispatchUnhandled
(@Nonnull final CompletableFuture future)
Method dispatchUnhandled.
- Parameters:
@Nonnull final CompletableFuturefuture
dispatchEventMap
CompletableFuture
dispatchEventMap
(@Nonnull CompletableFuture future, @Nonnull final AsyncEventConsumerMap eventMap, @Nonnull final String s)
Method dispatchEventMap.
- Parameters:
@Nonnull CompletableFuturefuture@Nonnull final AsyncEventConsumerMapeventMap@Nonnull final Strings
register
EventType>
register
(final short priority, final KeyType key, @Nonnull final Consumer consumer)
Method register.
- Parameters:
final shortpriorityfinal KeyTypekey@Nonnull final Consumerconsumer
registerGlobal
EventType>
registerGlobal
(final short priority, @Nonnull final Consumer consumer)
Method registerGlobal.
- Parameters:
final shortpriority@Nonnull final Consumerconsumer
registerUnhandled
EventType>
registerUnhandled
(final short priority, @Nonnull final Consumer consumer)
Method registerUnhandled.
- Parameters:
final shortpriority@Nonnull final Consumerconsumer
dispatchFor
CompletableFuture>
dispatchFor
(@Nullable final KeyType key)
Method dispatchFor.
- Parameters:
@Nullable final KeyTypekey
hasListener
boolean
hasListener
()
Method hasListener.
AsyncEventConsumer
public
AsyncEventConsumer
(final short priority, @Nonnull final String consumerString, @Nonnull final Function, CompletableFuture> function)
Method AsyncEventConsumer.
- Parameters:
final shortpriority@Nonnull final StringconsumerString@Nonnull final Functionfunction, CompletableFuture >
getFunction
CompletableFuture>
getFunction
()
Method getFunction.
getTimedFunction
CompletableFuture>
getTimedFunction
()
Method getTimedFunction.
toString
String
toString
()
Method toString.
dispatch0
CompletableFuture
dispatch0
(final EventType event)
Method dispatch0.
- Parameters:
final EventTypeevent