Implementing a Pretty Printer
You need to implement the interface hermes.fix.FIXPrettyPrinter:
public class AcmeFIXPrettyPrinter implements FIXPrettyPrinter
{
public String print(FIXMessage message)
{
}
}
You can view the default implementation here
.
Once you've compiled your code (and you can find the FIXPrettyPrinter interface hermes.jar ether put the JAR in the Hermes lib directory or load it up at runtime.
It is easiest to use Python to reconfigure Hermes:
from hermes.browser import HermesBrowser
from com.acme.fix import AcmeFIXPrettyPrinter
HermesBrowser.getBrowser().setFIXPrettyPrinter(AcmeFIXPrettyPrinter())
classLoader = browser.getLoader().getClassLoaderManager().getClassLoader("My Custom Code")
HermesBrowser.getBrowser().setFIXPrettyPrinter(classLoader.loadClass("com.acme.fix.AcmeFIXPrettyPrinter").newInstance())
Alternative Pretty Print Format
There is an alternative FIX pretty printer called hermes.fix.VerbosePrettyPrinter that is a little more verbose than the default: