org.apache.log.output.jms
Class TextMessageBuilder

java.lang.Object
  extended byorg.apache.log.output.jms.TextMessageBuilder
All Implemented Interfaces:
MessageBuilder

public class TextMessageBuilder
extends java.lang.Object
implements MessageBuilder

Basic message factory that stores LogEvent in Message.

Author:
Avalon Development Team, Peter Donald

Constructor Summary
TextMessageBuilder(Formatter formatter)
          Creation of a new text message builder.
TextMessageBuilder(PropertyInfo[] properties, Formatter formatter)
          Creation of a new text message builder.
 
Method Summary
 javax.jms.Message buildMessage(javax.jms.Session session, LogEvent event)
          Build a message from the supplied session for the supplied event
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextMessageBuilder

public TextMessageBuilder(Formatter formatter)
Creation of a new text message builder.

Parameters:
formatter - the message formatter

TextMessageBuilder

public TextMessageBuilder(PropertyInfo[] properties,
                          Formatter formatter)
Creation of a new text message builder.

Parameters:
properties - the property info set
formatter - the message formatter
Method Detail

buildMessage

public javax.jms.Message buildMessage(javax.jms.Session session,
                                      LogEvent event)
                               throws javax.jms.JMSException
Build a message from the supplied session for the supplied event

Specified by:
buildMessage in interface MessageBuilder
Parameters:
session - the session
event - the log event
Returns:
the message
Throws:
javax.jms.JMSException - if a messaging related error occurs


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.