com.web_visage.ichat
Class DefaultMessageReader

java.lang.Object
  extended by com.web_visage.ichat.AbstractMessageReader
      extended by com.web_visage.ichat.DefaultMessageReader
All Implemented Interfaces:
IChatReader

public class DefaultMessageReader
extends AbstractMessageReader
implements IChatReader

Default implementation of the IChatReader reader. Reads messages from the given InputStream. Uses roll-forward strategy when encounters errors.

Author:
K.Baturytski

Constructor Summary
DefaultMessageReader(IChatMessageFactory aMessageFactory, java.io.InputStream anInputStream)
          Constructor.
 
Method Summary
 IChatMessage[] readMessages()
          Reads next message bundle.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMessageReader

public DefaultMessageReader(IChatMessageFactory aMessageFactory,
                            java.io.InputStream anInputStream)
Constructor.

Parameters:
aMessageFactory -
anInputStream -
Method Detail

readMessages

public IChatMessage[] readMessages()
                            throws java.io.IOException,
                                   IChatException
Description copied from interface: IChatReader
Reads next message bundle.

Specified by:
readMessages in interface IChatReader
Returns:
Throws:
java.io.IOException
IChatException
See Also:
IChatReader.readMessages()