org.mailster.mina
Interface DataConsumer

All Known Implementing Classes:
TextLineConsumer

public interface DataConsumer

---
Mailster (C) 2007-2009 De Oliveira Edouard

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

See  Mailster Web Site
---

DataConsumer.java - An interface that defines the data consumer of a CumulativeIoFilter. A consumer is used to delimit messages before forwarding them to the IoFilterCodec codec. Example : TextLineConsumer - messages are delimited by the \r\n sequence.

Version:
$Revision: 1.4 $, $Date: 2009/01/30 01:32:30 $
Author:
Edouard De Oliveira

Method Summary
 boolean consume(org.apache.mina.core.filterchain.IoFilter.NextFilter nextFilter, org.apache.mina.core.buffer.IoBuffer in)
          Consumes data and sends it to the IoFilterCodec#unwrap(NextFilter, IoBuffer) method.
 IoFilterCodec getCodec()
          Returns the IoFilterCodec codec to which data is sent when consumed.
 

Method Detail

consume

boolean consume(org.apache.mina.core.filterchain.IoFilter.NextFilter nextFilter,
                org.apache.mina.core.buffer.IoBuffer in)
                throws java.lang.Exception
Consumes data and sends it to the IoFilterCodec#unwrap(NextFilter, IoBuffer) method.

Throws:
java.lang.Exception

getCodec

IoFilterCodec getCodec()
Returns the IoFilterCodec codec to which data is sent when consumed.