activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r384173 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
Date Wed, 08 Mar 2006 10:14:45 GMT
Author: jstrachan
Date: Wed Mar  8 02:14:44 2006
New Revision: 384173

URL: http://svn.apache.org/viewcvs?rev=384173&view=rev
Log:
added helper method to create non-persistent output streams together with added more javadoc

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java?rev=384173&r1=384172&r2=384173&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
Wed Mar  8 02:14:44 2006
@@ -27,6 +27,7 @@
 import javax.jms.Connection;
 import javax.jms.ConnectionConsumer;
 import javax.jms.ConnectionMetaData;
+import javax.jms.DeliveryMode;
 import javax.jms.Destination;
 import javax.jms.ExceptionListener;
 import javax.jms.IllegalStateException;
@@ -1468,10 +1469,23 @@
     }
 
 
+    /**
+     * Creates a persistent output stream; individual messages will be written to disk/database
by the broker
+     */
     public OutputStream createOutputStream(Destination dest) throws JMSException {
         return createOutputStream(dest, null, ActiveMQMessage.DEFAULT_DELIVERY_MODE, ActiveMQMessage.DEFAULT_PRIORITY,
ActiveMQMessage.DEFAULT_TIME_TO_LIVE);
     }
 
+    /**
+     * Creates a non persistent output stream; messages will not be written to disk
+     */
+    public OutputStream createNonPersistentOutputStream(Destination dest) throws JMSException
{
+        return createOutputStream(dest, null, DeliveryMode.NON_PERSISTENT, ActiveMQMessage.DEFAULT_PRIORITY,
ActiveMQMessage.DEFAULT_TIME_TO_LIVE);
+    }
+
+    /**
+     * Creates an output stream allowing full control over the delivery mode, the priority
and time to live of the messaages and the properties added to messages on the stream.
+     */
     public OutputStream createOutputStream(Destination dest, Map streamProperties, int deliveryMode,
int priority, long timeToLive) throws JMSException {
         checkClosedOrFailed();
         ensureConnectionInfoSent();



Mime
View raw message