-
- All Implemented Interfaces:
-
net.pwall.pipeline.BaseCoAcceptor,net.pwall.pipeline.CoAcceptor
public final class SimpleCoAcceptor<A extends Object> extends AbstractCoAcceptor<A, Unit>
A simple implementation of CoAcceptor that takes a lambda as the accepting function.
-
-
Constructor Summary
Constructors Constructor Description SimpleCoAcceptor(SuspendFunction1<A, Unit> block)
-
Method Summary
Modifier and Type Method Description UnitgetResult()final SuspendFunction1<A, Unit>getBlock()UnitacceptObject(A value)Accept a value, after closedcheck and test for end of data.-
Methods inherited from class net.pwall.pipeline.BaseAbstractCoAcceptor
close, getClosed -
Methods inherited from class net.pwall.pipeline.BaseCoAcceptor
flush, getComplete -
Methods inherited from class net.pwall.pipeline.AbstractCoAcceptor
accept -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
SimpleCoAcceptor
SimpleCoAcceptor(SuspendFunction1<A, Unit> block)
-
-
Method Detail
-
getBlock
final SuspendFunction1<A, Unit> getBlock()
-
acceptObject
Unit acceptObject(A value)
Accept a value, after
closedcheck and test for end of data. Invoke the lambda with the value.- Parameters:
value- the input value
-
-
-
-