Package me.tamkungz.signals.internal
Class SignalEnvelope<T>
java.lang.Object
me.tamkungz.signals.internal.SignalEnvelope<T>
- Type Parameters:
T- payload type
- All Implemented Interfaces:
foo.zaaarf.geb.api.IEvent
GEB event that carries one signal payload together with the key it was fired on.
Internal: this is the only event type SignalRouter listens to. It is public because the
dispatcher GEB generates for it lives in this package and must be reachable from the bus.
-
Constructor Summary
ConstructorsConstructorDescriptionSignalEnvelope(Class<T> eventType, T value) Wraps a payload for the default key of its type.SignalEnvelope(SignalKey<T> key, T value) Wraps a payload for the given key. -
Method Summary
-
Constructor Details
-
SignalEnvelope
Wraps a payload for the default key of its type.- Parameters:
eventType- payload typevalue- payload
-
SignalEnvelope
Wraps a payload for the given key.- Parameters:
key- key the payload is fired onvalue- payload
-
-
Method Details
-
key
Returns the key the payload is fired on.- Returns:
- signal key
-
eventType
Returns the payload type.- Returns:
- payload class
-
value
Returns the payload.- Returns:
- payload value
-