org.apache.commons.messenger.tool
Class Producer
java.lang.Object
org.apache.commons.messenger.tool.Producer
- Direct Known Subclasses:
- Caller
- public class Producer
- extends java.lang.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: 1.5 $
- Author:
- James Strachan
Method Summary |
protected javax.jms.Message |
createMessage(java.io.Reader in)
Creates a message from the given text file |
static void |
main(java.lang.String[] args)
|
protected java.lang.String |
readText(java.io.Reader in)
Reads the given text stream into a single string |
void |
run(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
messenger
protected Messenger messenger
Producer
public Producer()
main
public static void main(java.lang.String[] args)
run
public void run(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
createMessage
protected javax.jms.Message createMessage(java.io.Reader in)
throws java.lang.Exception
- Creates a message from the given text file
- Throws:
java.lang.Exception
readText
protected java.lang.String readText(java.io.Reader in)
throws java.io.IOException
- Reads the given text stream into a single string
- Throws:
java.io.IOException