public class ChannelCoAcceptor<A>
extends AbstractCoAcceptor
An implementation of interface CoAcceptor that sends the value to a SendChannel.
interface CoAcceptor| Constructor and Description |
|---|
ChannelCoAcceptor(kotlinx.coroutines.channels.SendChannel<? super A> channel)
An implementation of
interface CoAcceptor that sends the value to a SendChannel. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
acceptObject(A value,
kotlin.coroutines.Continuation<? super kotlin.Unit> p)
Accept a value, after
closed check and test for end of data. Send the value to the SendChannel. |
void |
close()
Close the acceptor.
|
accept, acceptObjectclose, getClosed, getComplete, getResultacceptgetClosed, getComplete, getResultpublic ChannelCoAcceptor(@NotNull
kotlinx.coroutines.channels.SendChannel<? super A> channel)
An implementation of interface CoAcceptor that sends the value to a SendChannel.
interface CoAcceptor@Nullable
public java.lang.Object acceptObject(A value,
@NotNull
kotlin.coroutines.Continuation<? super kotlin.Unit> p)
Accept a value, after closed check and test for end of data. Send the value to the SendChannel.
value - the input valuepublic void close()
Close the acceptor.