org.apache.activemq
Interface StreamConnection

All Superinterfaces:
Connection
All Known Implementing Classes:
ActiveMQConnection, ActiveMQXAConnection

public interface StreamConnection
extends Connection

The StreamConnection interface allows you to send and receive data from a Destination in using standard java InputStream and OutputStream objects. It's best use case is to send and receive large amounts of data that would be to large to hold in a single JMS message.


Method Summary
 InputStream createDurableInputStream(Topic dest, String name)
           
 InputStream createDurableInputStream(Topic dest, String name, String messageSelector)
           
 InputStream createDurableInputStream(Topic dest, String name, String messageSelector, boolean noLocal)
           
 InputStream createDurableInputStream(Topic dest, String name, String messageSelector, boolean noLocal, long timeout)
           
 InputStream createInputStream(Destination dest)
           
 InputStream createInputStream(Destination dest, String messageSelector)
           
 InputStream createInputStream(Destination dest, String messageSelector, boolean noLocal)
           
 InputStream createInputStream(Destination dest, String messageSelector, boolean noLocal, long timeout)
           
 OutputStream createOutputStream(Destination dest)
           
 OutputStream createOutputStream(Destination dest, Map<String,Object> streamProperties, int deliveryMode, int priority, long timeToLive)
           
 void unsubscribe(String name)
          Unsubscribes a durable subscription that has been created by a client.
 
Methods inherited from interface javax.jms.Connection
close, createConnectionConsumer, createDurableConnectionConsumer, createSession, getClientID, getExceptionListener, getMetaData, setClientID, setExceptionListener, start, stop
 

Method Detail

createInputStream

InputStream createInputStream(Destination dest)
                              throws JMSException
Throws:
JMSException

createInputStream

InputStream createInputStream(Destination dest,
                              String messageSelector)
                              throws JMSException
Throws:
JMSException

createInputStream

InputStream createInputStream(Destination dest,
                              String messageSelector,
                              boolean noLocal)
                              throws JMSException
Throws:
JMSException

createInputStream

InputStream createInputStream(Destination dest,
                              String messageSelector,
                              boolean noLocal,
                              long timeout)
                              throws JMSException
Throws:
JMSException

createDurableInputStream

InputStream createDurableInputStream(Topic dest,
                                     String name)
                                     throws JMSException
Throws:
JMSException

createDurableInputStream

InputStream createDurableInputStream(Topic dest,
                                     String name,
                                     String messageSelector)
                                     throws JMSException
Throws:
JMSException

createDurableInputStream

InputStream createDurableInputStream(Topic dest,
                                     String name,
                                     String messageSelector,
                                     boolean noLocal)
                                     throws JMSException
Throws:
JMSException

createDurableInputStream

InputStream createDurableInputStream(Topic dest,
                                     String name,
                                     String messageSelector,
                                     boolean noLocal,
                                     long timeout)
                                     throws JMSException
Throws:
JMSException

createOutputStream

OutputStream createOutputStream(Destination dest)
                                throws JMSException
Throws:
JMSException

createOutputStream

OutputStream createOutputStream(Destination dest,
                                Map<String,Object> streamProperties,
                                int deliveryMode,
                                int priority,
                                long timeToLive)
                                throws JMSException
Throws:
JMSException

unsubscribe

void unsubscribe(String name)
                 throws JMSException
Unsubscribes a durable subscription that has been created by a client.

This method deletes the state being maintained on behalf of the subscriber by its provider.

It is erroneous for a client to delete a durable subscription while there is an active MessageConsumer or TopicSubscriber for the subscription, or while a consumed message is part of a pending transaction or has not been acknowledged in the session.

Parameters:
name - the name used to identify this subscription
Throws:
JMSException - if the session fails to unsubscribe to the durable subscription due to some internal error.
InvalidDestinationException - if an invalid subscription name is specified.
Since:
1.1


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.