Class SimpleMsg

java.lang.Object
org.jpos.util.SimpleMsg
All Implemented Interfaces:
Loggeable

public class SimpleMsg extends Object implements Loggeable

A simple general purpose loggeable message.

  • Constructor Details

    • SimpleMsg

      public SimpleMsg(String tagName, String msgName, Object msgContent)
      Constructs a SimpleMsg with an XML tag, an optional name attribute, and a payload.
      Parameters:
      tagName - XML tag name
      msgName - optional name attribute, or null
      msgContent - message payload (rendered specially for byte arrays, collections, throwables, and loggeables)
    • SimpleMsg

      public SimpleMsg(String tagName, Object msgContent)
      Constructs a SimpleMsg with no name attribute.
      Parameters:
      tagName - XML tag name
      msgContent - message payload
  • Method Details

    • dump

      public void dump(PrintStream p, String indent)
      dumps message
      Specified by:
      dump in interface Loggeable
      Parameters:
      p - a PrintStream usually supplied by Logger
      indent - indention string, usually suppiled by Logger
      See Also:
    • setMsgContent

      public void setMsgContent(Object msgContent)
      Replaces the message payload.
      Parameters:
      msgContent - new payload
    • getMsgContent

      Returns the current message payload.
      Returns:
      the payload (may be null)