Package com.mewna.catnip.shard.event
Interface DispatchManager
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
AbstractDispatchManager
,DefaultDispatchManager
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
close()
<T> MessageConsumer<T>
createConsumer
(String address) Returns a consumer listening on the provided address.void
dispatchEvent
(String address, Object event) Dispatches an event to the provided address.
-
Method Details
-
catnip
-
dispatchEvent
Dispatches an event to the provided address.- Parameters:
address
- Address to send the event to.event
- Event to dispatch.
-
createConsumer
Returns a consumer listening on the provided address.- Type Parameters:
T
- Type of the event handled by the consumer.- Parameters:
address
- Address to listen on.- Returns:
- A consumer listening on the provided address.
-
close
void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-