Java API
class

SignalEnvelope

me.tamkungz.signals.internal.SignalEnvelope

Version
0.2.1-SNAPSHOT
Java
21
Source file
me/tamkungz/signals/internal/SignalEnvelope.java
Repository
View source ↗

GEB event that carries one signal payload together with the key it was fired on.

<p>

Internal: this is the only event type {@link SignalRouter} listens to. It is public because the

dispatcher GEB generates for it lives in this package and must be reachable from the bus.

public final class SignalEnvelope<T> implements IEvent

Constructors 2

SignalEnvelope

public SignalEnvelope(Class<T> eventType, T value)

Wraps a payload for the default key of its type.

@param
eventType payload type
@param
value payload

SignalEnvelope

public SignalEnvelope(SignalKey<T> key, T value)

Wraps a payload for the given key.

@param
key key the payload is fired on
@param
value payload

Methods 3

key

public SignalKey<T> key()

Returns the key the payload is fired on.

@return
signal key

eventType

public Class<T> eventType()

Returns the payload type.

@return
payload class

value

public T value()

Returns the payload.

@return
payload value