Package 

Class ByteChannelCoAcceptor

  • All Implemented Interfaces:
    net.pwall.pipeline.BaseCoAcceptor , net.pwall.pipeline.IntCoAcceptor

    
    public final class ByteChannelCoAcceptor
    extends AbstractIntCoAcceptor<Unit>
                        

    An implementation of IntCoAcceptor that sends the value to a ByteWriteChannel.

    The Int values are expected to be in the range 0..255, i.e. byte values. That makes this class suitable as the downstream acceptor for an encoder pipeline.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit getResult()
      Unit acceptInt(Integer value) Accept a value, after closed check and test for end of data.
      Unit close() Close the acceptor.
      Unit flush() Flush the output to the channel.
      • Methods inherited from class net.pwall.pipeline.BaseAbstractCoAcceptor

        getClosed
      • Methods inherited from class net.pwall.pipeline.BaseCoAcceptor

        getComplete
      • Methods inherited from class net.pwall.pipeline.AbstractIntCoAcceptor

        accept
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ByteChannelCoAcceptor

        ByteChannelCoAcceptor(ByteWriteChannel channel)
    • Method Detail

      • acceptInt

         Unit acceptInt(Integer value)

        Accept a value, after closed check and test for end of data. Send the value to the ByteWriteChannel.

        Parameters:
        value - the input value
      • flush

         Unit flush()

        Flush the output to the channel.