001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.jms.client;
023:
024: import java.util.Enumeration;
025:
026: import javax.jms.ExceptionListener;
027: import javax.jms.JMSException;
028:
029: import org.jboss.jms.destination.JBossTemporaryDestination;
030:
031: /**
032: * The implementation of a connection
033: *
034: * @author <a href="mailto:adrian@jboss.org>Adrian Brock</a>
035: * @version $Revision: 57195 $
036: */
037: public interface ConnectionDelegate extends Lifecycle {
038: // Constants -----------------------------------------------------
039:
040: // Public --------------------------------------------------------
041:
042: /**
043: * Create a session
044: *
045: * @param transacted whether the session is transacted
046: * @param the acknowledgement mode
047: * @return the session
048: * @throws JMSException for any error
049: */
050: SessionDelegate createSession(boolean isXA, boolean transacted,
051: int acknowledgeMode) throws JMSException;
052:
053: /**
054: * Retrieve the extension property names
055: *
056: * @return an enumeration of extension properties
057: * @throws JMSException for any error
058: */
059: Enumeration getJMSXPropertyNames() throws JMSException;
060:
061: /**
062: * Retrieve the client id
063: *
064: * @return the client id
065: * @throws JMSException for any error
066: */
067: String getClientID() throws JMSException;
068:
069: /**
070: * Delete the temporary destination
071: *
072: * @param the destination to delete
073: * @throws JMSException for any error
074: */
075: void deleteTempDestination(JBossTemporaryDestination destination);
076:
077: /**
078: * Set the client id
079: *
080: * @param id the client id
081: * @throws JMSException for any error
082: */
083: void setClientID(String id) throws JMSException;
084:
085: /**
086: * Set the exception listener
087: *
088: * @param the new exception listener
089: * @throws JMSException for any error
090: */
091: void setExceptionListener(ExceptionListener listener)
092: throws JMSException;
093:
094: /**
095: * Start the connection
096: *
097: * @throws JMSException for any error
098: */
099: void start() throws JMSException;
100:
101: /**
102: * Stop the connection
103: *
104: * @throws JMSException for any error
105: */
106: void stop() throws JMSException;
107:
108: // Inner Classes --------------------------------------------------
109: }
|