xmlBlaster 2.1.0 API

org.xmlBlaster.util
Class FileDumper

java.lang.Object
  extended by org.xmlBlaster.util.FileDumper

public class FileDumper
extends java.lang.Object

Dump message to file. The XML is in XmlScript format and can be refed.

 Configuration:
 xmlBlaster/FileDumper/directoryName  -> ${user.home}/FileDumper
 xmlBlaster/FileDumper/forceBase64    -> false
 

Author:
Marcel Ruff

Field Summary
private  java.lang.String directoryName
           
private  boolean forceBase64
          forceBase64==false: ASCII dump for content if possible (XML embedable)
private  Global glob
           
private static java.util.logging.Logger log
           
private static java.lang.String ME
           
 
Constructor Summary
FileDumper(Global glob)
           
FileDumper(Global glob, java.lang.String dirName, boolean forceBase64)
           
 
Method Summary
 java.lang.String dumpMessage(KeyData keyData, byte[] content, QosData qosData)
           
 java.lang.String dumpMessage(KeyData keyData, byte[] content, QosData qosData, boolean verbose)
          Dump dead message to hard disk.
private  java.io.File initDirectory(java.io.File parent, java.lang.String propName, java.lang.String dirName)
          Returns the specified directory or null or if needed it will create one
 boolean isForceBase64()
           
 void setForceBase64(boolean forceBase64)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ME

private static java.lang.String ME

log

private static java.util.logging.Logger log

glob

private Global glob

directoryName

private java.lang.String directoryName

forceBase64

private boolean forceBase64
forceBase64==false: ASCII dump for content if possible (XML embedable)

Constructor Detail

FileDumper

public FileDumper(Global glob)
           throws XmlBlasterException
Throws:
XmlBlasterException

FileDumper

public FileDumper(Global glob,
                  java.lang.String dirName,
                  boolean forceBase64)
           throws XmlBlasterException
Throws:
XmlBlasterException
Method Detail

dumpMessage

public java.lang.String dumpMessage(KeyData keyData,
                                    byte[] content,
                                    QosData qosData)

dumpMessage

public java.lang.String dumpMessage(KeyData keyData,
                                    byte[] content,
                                    QosData qosData,
                                    boolean verbose)
Dump dead message to hard disk. The file name is the receive timestamp of the message, for example /home/xmlblast/tmp/2004-10-23_18_52_39_87.xml

Parameters:
qosData - may not be null
Returns:
fileName

initDirectory

private java.io.File initDirectory(java.io.File parent,
                                   java.lang.String propName,
                                   java.lang.String dirName)
                            throws XmlBlasterException
Returns the specified directory or null or if needed it will create one

Parameters:
parent -
propName - For logging only
dirName -
Returns:
Throws:
XmlBlasterException

isForceBase64

public boolean isForceBase64()

setForceBase64

public void setForceBase64(boolean forceBase64)

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.