org.apache.commons.messenger.tool
Class Producer

java.lang.Object
  extended by org.apache.commons.messenger.tool.Producer
Direct Known Subclasses:
Caller

public class Producer
extends Object

Producer is a sample program that creates messages and sends them to a given destination which could either be a queue or a topc.

Version:
$Revision: 155459 $
Author:
James Strachan

Field Summary
protected  Messenger messenger
           
 
Constructor Summary
Producer()
           
 
Method Summary
protected  javax.jms.Message createMessage(Reader in)
          Creates a message from the given text file
static void main(String[] args)
           
protected  String readText(Reader in)
          Reads the given text stream into a single string
 void run(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messenger

protected Messenger messenger
Constructor Detail

Producer

public Producer()
Method Detail

main

public static void main(String[] args)

run

public void run(String[] args)
         throws Exception
Throws:
Exception

createMessage

protected javax.jms.Message createMessage(Reader in)
                                   throws Exception
Creates a message from the given text file

Throws:
Exception

readText

protected String readText(Reader in)
                   throws IOException
Reads the given text stream into a single string

Throws:
IOException


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.