Interface Emitter<T>
-
- All Known Implementing Classes:
LegacyEmitterImpl
@Deprecated public interface Emitter<T>
Deprecated.UseEmitter
instead.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
complete()
Deprecated.Completes the stream.void
error(Exception e)
Deprecated.Propagates an error in the stream.boolean
isCancelled()
Deprecated.boolean
isRequested()
Deprecated.Emitter<T>
send(T msg)
Deprecated.Sends a payload or a message to the stream.
-
-
-
Method Detail
-
send
Emitter<T> send(T msg)
Deprecated.Sends a payload or a message to the stream.- Parameters:
msg
- the thing to send, must not benull
- Returns:
- the current emitter
- Throws:
IllegalStateException
- if the stream does not have any pending requests, or if the stream has been cancelled or terminated.
-
complete
void complete()
Deprecated.Completes the stream. This method sends the completion signal, no messages can be sent once this method is called.
-
error
void error(Exception e)
Deprecated.Propagates an error in the stream. This methods sends an error signal, no messages can be sent once this method is called.- Parameters:
e
- the exception, must not benull
-
isCancelled
boolean isCancelled()
Deprecated.- Returns:
true
if the emitter has been terminated or the subscription cancelled.
-
isRequested
boolean isRequested()
Deprecated.- Returns:
true
if the subscriber accepts messages,false
otherwise. Usingsend(Object)
on an emitter not expecting message would throw anIllegalStateException
.
-
-