View Javadoc

1   /***
2    * Redistribution and use of this software and associated documentation
3    * ("Software"), with or without modification, are permitted provided
4    * that the following conditions are met:
5    *
6    * 1. Redistributions of source code must retain copyright
7    *    statements and notices.  Redistributions must also contain a
8    *    copy of this document.
9    *
10   * 2. Redistributions in binary form must reproduce the
11   *    above copyright notice, this list of conditions and the
12   *    following disclaimer in the documentation and/or other
13   *    materials provided with the distribution.
14   *
15   * 3. The name "Exolab" must not be used to endorse or promote
16   *    products derived from this Software without prior written
17   *    permission of Exoffice Technologies.  For written permission,
18   *    please contact info@exolab.org.
19   *
20   * 4. Products derived from this Software may not be called "Exolab"
21   *    nor may "Exolab" appear in their names without prior written
22   *    permission of Exoffice Technologies. Exolab is a registered
23   *    trademark of Exoffice Technologies.
24   *
25   * 5. Due credit should be given to the Exolab Project
26   *    (http://www.exolab.org/).
27   *
28   * THIS SOFTWARE IS PROVIDED BY EXOFFICE TECHNOLOGIES AND CONTRIBUTORS
29   * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
30   * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
31   * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
32   * EXOFFICE TECHNOLOGIES OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
33   * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
34   * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
35   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
37   * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
38   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
39   * OF THE POSSIBILITY OF SUCH DAMAGE.
40   *
41   * Copyright 1999 (C) Exoffice Technologies Inc. All Rights Reserved.
42   *
43   * $Id: RemoteJmsServerConnectionIfc.java,v 1.7 2003/08/17 01:32:26 tanderson Exp $
44   *
45   * Date         Author  Changes
46   * 04/18/2000   jima    Created
47   */
48  package org.exolab.jms.server.rmi;
49  
50  import java.rmi.Remote;
51  import java.rmi.RemoteException;
52  import java.util.Enumeration;
53  
54  import javax.jms.JMSException;
55  
56  
57  /***
58   * This class RMI enables the JmsServerConnection by allowing clients to access
59   * the object across another VM. It basically has been grafted off the
60   * JmsServerConnection class with the RemoteException appended to the message
61   * signature.
62   *
63   * @version     $Revision: 1.7 $ $Date: 2003/08/17 01:32:26 $
64   * @author      <a href="mailto:jima@exoffice.com">Jim Alateras</a>
65   * @see         org.exolab.jms.server.JmsServerConnection
66   */
67  public interface RemoteJmsServerConnectionIfc
68      extends Remote {
69  
70      /***
71       * Create and return a sesion for this connection  Assign the connection's
72       * clientId to the sessions.
73       * <p>
74       * The created session represents an endpoint with the JmsServer where
75       * you can create consumers, producers and destinations. If there is an
76       * error creating the session then RemoteException is thrown
77       *
78       * @param       ackMode         the ack mode for the session
79       * @return      JmsSession      created session
80       * @exception   JMSException
81       * @exception   RemoteException
82       */
83      public RemoteJmsServerSessionIfc createSession(int ackMode, boolean transacted)
84          throws JMSException, RemoteException;
85  
86      /***
87       * Delete the specified session from the server. This will destroy all
88       * associated consumers and producers.
89       * <p>
90       * If there is a problem completing this request then throw RemoteException
91       * exception
92       *
93       * @param       session         session to delete
94       * @exception   JMSException
95       * @exception   RemoteException
96       */
97      public void deleteSession(RemoteJmsServerSessionIfc session)
98          throws JMSException, RemoteException;
99  
100     /***
101      * Return the number of session objects currently allocated to this
102      * connection.
103      * <p>
104      * If there is a problem completing this request then throw RemoteException
105      * exception
106      *
107      * @return      int
108      * @exception   JMSException
109      * @exception   RemoteException
110      */
111     public int getSessionCount()
112         throws JMSException, RemoteException;
113 
114     /***
115      * Return an enumeration of RemoteJmsServerSessionIfc objects currently
116      * allocated to this session.
117      * <p>
118      * If there is a problem completing this request then throw RemoteException
119      * exception
120      *
121      * @return      Enumeration
122      * @exception   JMSException
123      * @exception   RemoteException
124      */
125     public Enumeration getSessions()
126         throws JMSException, RemoteException;
127 
128     /***
129      * Start all the sessions allocated to this connection.
130      * <p>
131      * If there is a problem completing this request then throw RemoteException
132      * exception
133      *
134      * @exception   JMSException
135      * @exception   RemoteException
136      */
137     public void start()
138         throws JMSException, RemoteException;
139 
140     /***
141      * Stop all the sessions allocated to this collection. Do not reemove
142      * the session
143      * <p>
144      * If there is a problem completing this request then throw RemoteException
145      * exception
146      *
147      * @exception   JMSException
148      * @exception   RemoteException
149      */
150     public void stop()
151         throws JMSException, RemoteException;
152 
153     /***
154      * Close all the sessions allocated to this collection. This will also
155      * remove the session from the allocated list of sessions
156      * <p>
157      * If there is a problem completing this request then throw RemoteException
158      * exception
159      *
160      * @exception   JMSException
161      * @exception   RemoteException
162      */
163     public void close()
164         throws JMSException, RemoteException;
165 
166     /***
167      * Retrieve the identity of this conection.
168      *
169      * @return      String
170      * @exception   RemoteException
171      */
172     public String getConnectionId()
173         throws RemoteException;
174 
175     /***
176      * Send a ping to the server.
177      *
178      * @exception   RemoteException
179      */
180     public void ping()
181         throws RemoteException;
182 }
183 
184 
185