de.unikiel.ipn.htmlform
Class SimpleAppender

java.lang.Object
  |
  +--de.unikiel.ipn.htmlform.SimpleAppender
All Implemented Interfaces:
Appender, MessageHandler

class SimpleAppender
extends java.lang.Object
implements Appender, MessageHandler

This Class provides a simple Appender implementation. It changes files based only on the information stored in the Entry objects.


Constructor Summary
(package private) SimpleAppender(MessageHandler handler)
          Creates a new instance.
 
Method Summary
 void append(Entry[] entries)
          Applies all changes that are stored in the entries.
 void handleMessage(Message msg)
          Forwards the Message to the successor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleAppender

SimpleAppender(MessageHandler handler)
Creates a new instance.

Parameters:
handler - the MessageHandler that shall handle occuring error messages.
Throws:
java.lang.NullPointerException - if handler == null
Method Detail

append

public void append(Entry[] entries)
Applies all changes that are stored in the entries. Order from first to last entry is guaranteed.

Specified by:
append in interface Appender
Parameters:
entries - an array containing the Entry objects
Throws:
java.lang.ArrayIndexOutOfBoundsException - when entries.length == 0
java.lang.NullPointerException - when entries == null
See Also:
Entry

handleMessage

public void handleMessage(Message msg)
Forwards the Message to the successor. See constructor.

Specified by:
handleMessage in interface MessageHandler
Parameters:
msg - the message that shall be passed to the successor.