Save This Page
Home » activemq-parent-5.3.1-source-release » org.apache » activemq » [javadoc | source]
    1   /**
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements.  See the NOTICE file distributed with
    4    * this work for additional information regarding copyright ownership.
    5    * The ASF licenses this file to You under the Apache License, Version 2.0
    6    * (the "License"); you may not use this file except in compliance with
    7    * the License.  You may obtain a copy of the License at
    8    *
    9    *      http://www.apache.org/licenses/LICENSE-2.0
   10    *
   11    * Unless required by applicable law or agreed to in writing, software
   12    * distributed under the License is distributed on an "AS IS" BASIS,
   13    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   14    * See the License for the specific language governing permissions and
   15    * limitations under the License.
   16    */
   17   package org.apache.activemq;
   18   
   19   import java.io.InputStream;
   20   import java.io.OutputStream;
   21   import java.util.Map;
   22   
   23   import javax.jms.Connection;
   24   import javax.jms.Destination;
   25   import javax.jms.InvalidDestinationException;
   26   import javax.jms.JMSException;
   27   import javax.jms.Topic;
   28   
   29   /**
   30    * The StreamConnection interface allows you to send and receive data from a
   31    * Destination in using standard java InputStream and OutputStream objects. It's
   32    * best use case is to send and receive large amounts of data that would be to
   33    * large to hold in a single JMS message.
   34    * 
   35    * @version $Revision$
   36    */
   37   public interface StreamConnection extends Connection {
   38   
   39       InputStream createInputStream(Destination dest) throws JMSException;
   40   
   41       InputStream createInputStream(Destination dest, String messageSelector) throws JMSException;
   42   
   43       InputStream createInputStream(Destination dest, String messageSelector, boolean noLocal) throws JMSException;
   44   
   45       InputStream createDurableInputStream(Topic dest, String name) throws JMSException;
   46   
   47       InputStream createDurableInputStream(Topic dest, String name, String messageSelector) throws JMSException;
   48   
   49       InputStream createDurableInputStream(Topic dest, String name, String messageSelector, boolean noLocal) throws JMSException;
   50   
   51       OutputStream createOutputStream(Destination dest) throws JMSException;
   52   
   53       OutputStream createOutputStream(Destination dest, Map<String, Object> streamProperties, int deliveryMode, int priority, long timeToLive) throws JMSException;
   54   
   55       /**
   56        * Unsubscribes a durable subscription that has been created by a client.
   57        * <P>
   58        * This method deletes the state being maintained on behalf of the
   59        * subscriber by its provider.
   60        * <P>
   61        * It is erroneous for a client to delete a durable subscription while there
   62        * is an active <CODE>MessageConsumer </CODE> or
   63        * <CODE>TopicSubscriber</CODE> for the subscription, or while a consumed
   64        * message is part of a pending transaction or has not been acknowledged in
   65        * the session.
   66        * 
   67        * @param name the name used to identify this subscription
   68        * @throws JMSException if the session fails to unsubscribe to the durable
   69        *                 subscription due to some internal error.
   70        * @throws InvalidDestinationException if an invalid subscription name is
   71        *                 specified.
   72        * @since 1.1
   73        */
   74       void unsubscribe(String name) throws JMSException;
   75   }

Save This Page
Home » activemq-parent-5.3.1-source-release » org.apache » activemq » [javadoc | source]