org.jboss.soa.esb.notification
Class NotifyFiles

java.lang.Object
  extended by org.jboss.soa.esb.notification.NotificationTarget
      extended by org.jboss.soa.esb.notification.NotifyFiles

public class NotifyFiles
extends NotificationTarget

Write the notification contents into a list of files specified in the constructor time parameters.

Description: The constructor searches for all child elements of the ConfigTree argument having "file" as element name, that will be used to store (or append) the contents of the argument to the sendNotification(Object) method, to each and every one of the files contained in the list

Author: Heuristica - Buenos Aires - Argentina

Version:
1.0

Field Summary
static java.lang.String ATT_APPEND
          Attribute name of indicator to append to an existing file
static java.lang.String ATT_URI
          Attribute name that will be interpreted as the URI of the file to write to
static java.lang.String CHILD_FILE
          Mnemonic for the child element name that hold the files to write ("file")
protected  org.jboss.soa.esb.notification.NotifyFiles.NotificationFile[] m_oaOutF
          The NotificationFile[] that holds the output file list.
 
Fields inherited from class org.jboss.soa.esb.notification.NotificationTarget
m_oParms, PRM_NOTIF_CLASS
 
Constructor Summary
NotifyFiles(ConfigTree configTree)
          Instantiate a NotifyFiles object according to contents of <arg 1>
 
Method Summary
protected  void objectNotification(java.io.FileOutputStream p_oF, java.lang.Object p_o)
           
 void sendNotification(Message message)
          Writes the result of p_o into each one of the File objects contained in the m_oaOutF array
protected  void setFiles(Message message)
          Sets the value of m_oaOutF[] and m_baAppend[] to contents of each element of the input argument
protected  void stringNotification(java.io.FileOutputStream p_oF, java.lang.String p_s)
           
 
Methods inherited from class org.jboss.soa.esb.notification.NotificationTarget
fromParams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHILD_FILE

public static final java.lang.String CHILD_FILE
Mnemonic for the child element name that hold the files to write ("file")

See Also:
Constant Field Values

ATT_URI

public static final java.lang.String ATT_URI
Attribute name that will be interpreted as the URI of the file to write to

See Also:
Constant Field Values

ATT_APPEND

public static final java.lang.String ATT_APPEND
Attribute name of indicator to append to an existing file

See Also:
Boolean.valueOf(String), Constant Field Values

m_oaOutF

protected org.jboss.soa.esb.notification.NotifyFiles.NotificationFile[] m_oaOutF
The NotificationFile[] that holds the output file list.

Constructor Detail

NotifyFiles

public NotifyFiles(ConfigTree configTree)
Instantiate a NotifyFiles object according to contents of <arg 1>

Parameters:
configTree - ConfigTree - Should contain a nonempty set of child elements with elementName="file". Each child element must have a "URI" attribute and optionally a "append" element
Method Detail

setFiles

protected void setFiles(Message message)
Sets the value of m_oaOutF[] and m_baAppend[] to contents of each element of the input argument

Parameters:
p_oaP - ConfigTree[] - Each entry must have a "URI" attribute, and can have an optional "append" attribute
See Also:
ConfigTree.getAttribute(String)

sendNotification

public void sendNotification(Message message)
                      throws NotificationException
Writes the result of p_o into each one of the File objects contained in the m_oaOutF array

Specified by:
sendNotification in class NotificationTarget
Parameters:
message - Object - This object's toString() results will be written to (appended to) each one of the files in m_oaOutF
Throws:
NotificationException - - invoke Exception.getMessage() at runtime for this object
See Also:
NotifyFiles#setFiles(ConfigTree[]), m_oaOutF

stringNotification

protected void stringNotification(java.io.FileOutputStream p_oF,
                                  java.lang.String p_s)
                           throws java.io.IOException
Throws:
java.io.IOException

objectNotification

protected void objectNotification(java.io.FileOutputStream p_oF,
                                  java.lang.Object p_o)
                           throws java.io.IOException
Throws:
java.io.IOException