eu.v7f.jms
Class JMSStream
java.lang.Object
eu.v7f.jms.JMSStream
public class JMSStream
- extends java.lang.Object
JMSStream allows sending large streams (files) over a JMS provider based
ESB bus, e.g. based on ActiveMQ.
The JMSStream can be used as a library in Java programs, but also as a
command line tool to sent and retrieve files from a JMS provider.
The program offers the following features:
- Streaming synchroneous mode (error when destination fails).
(This is based on using a non-durable JMS topic and acknowledgements on
a temporary topic)
- Asynchroneous reliable mode (file remains in JMS until delivered).
(This is based on using a durable topic)
- Combined with an JMS Expiry date and durable subscribers the file can also
be delivered to multiple systems.
- Author:
- Tom Vijlbrief
|
Constructor Summary |
JMSStream(javax.naming.InitialContext ic,
javax.jms.TopicConnection connection,
java.lang.String topicname,
java.lang.String destname)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEF_TOPICNAME
public static final java.lang.String DEF_TOPICNAME
- See Also:
- Constant Field Values
DEF_DESTNAME
public static final java.lang.String DEF_DESTNAME
- See Also:
- Constant Field Values
JMSStream
public JMSStream(javax.naming.InitialContext ic,
javax.jms.TopicConnection connection,
java.lang.String topicname,
java.lang.String destname)
setTimeout
public void setTimeout(int timeout)
setPrefix
public void setPrefix(java.lang.String prefix)
setListener
public void setListener(JMSStreamListener l)
setIdentity
public void setIdentity(java.lang.String identity)
setExpiry
public void setExpiry(long expiry)
setVerbose
public void setVerbose(boolean v)
setPersistent
public void setPersistent(boolean v)
send
public void send(java.io.InputStream is,
java.lang.String filename)
throws java.lang.Exception
- Throws:
java.lang.Exception
receive
public void receive()
throws java.lang.Exception
- Throws:
java.lang.Exception
main
public static void main(java.lang.String[] args)