Class JilterProcessor


  • public class JilterProcessor
    extends java.lang.Object
    The guts of handling the filter side of the Milter protocol. If you have your own way that you like to handle communicating with the MTA side of the Milter protocol, you can feed an instance of this class the bytes from the MTA, and it will handle calling methods in a JilterHandler, as well as sending data back to the MTA via an arbitrary WritableByteChannel.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Closes this processor.
      boolean process​(java.nio.channels.WritableByteChannel writeChannel, java.nio.ByteBuffer dataBuffer)
      Process more data from the MTA.
      • Methods inherited from class java.lang.Object

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

      • JilterProcessor

        public JilterProcessor​(JilterHandler handler)
        Public constructor.
        Parameters:
        handler - the underlying handler that will receive calls based on the Milter conversation.
    • Method Detail

      • process

        public boolean process​(java.nio.channels.WritableByteChannel writeChannel,
                               java.nio.ByteBuffer dataBuffer)
                        throws java.io.IOException
        Process more data from the MTA.
        Parameters:
        writeChannel - the data channel for communicating back to the MTA.
        dataBuffer - the next chunk of data from the MTA.
        Returns:
        false if processing is completed.
        Throws:
        java.io.IOException
      • close

        public void close()
        Closes this processor. Will do the right thing to communicate to the underlying handler that processing is completed.