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.
Constructor and Description |
---|
Producer() |
Modifier and Type | Method and Description |
---|---|
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) |
protected Messenger messenger
public static void main(java.lang.String[] args)
public void run(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
protected javax.jms.Message createMessage(java.io.Reader in) throws java.lang.Exception
java.lang.Exception
protected java.lang.String readText(java.io.Reader in) throws java.io.IOException
java.io.IOException