1. /*
  2. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. package javax.jms;
  6. /** A client uses a <CODE>QueueConnectionFactory</CODE> object to create
  7. * <CODE>QueueConnection</CODE> objects with a point-to-point JMS provider.
  8. *
  9. * @version 1.0 - 14 May 1998
  10. * @author Mark Hapner
  11. * @author Rich Burridge
  12. *
  13. * @see javax.jms.ConnectionFactory
  14. */
  15. public interface QueueConnectionFactory extends ConnectionFactory {
  16. /** Creates a queue connection with the default user identity.
  17. * The connection is created in stopped mode. No messages
  18. * will be delivered until the <code>Connection.start</code> method
  19. * is explicitly called.
  20. *
  21. * @return a newly created queue connection
  22. *
  23. * @exception JMSException if the JMS provider fails to create the queue
  24. * connection due to some internal error.
  25. * @exception JMSSecurityException if client authentication fails due to
  26. * an invalid user name or password.
  27. */
  28. QueueConnection
  29. createQueueConnection() throws JMSException;
  30. /** Creates a queue connection with the specified user identity.
  31. * The connection is created in stopped mode. No messages
  32. * will be delivered until the <code>Connection.start</code> method
  33. * is explicitly called.
  34. *
  35. * @param userName the caller's user name
  36. * @param password the caller's password
  37. *
  38. * @return a newly created queue connection
  39. *
  40. * @exception JMSException if the JMS provider fails to create the queue
  41. * connection due to some internal error.
  42. * @exception JMSSecurityException if client authentication fails due to
  43. * an invalid user name or password.
  44. */
  45. QueueConnection
  46. createQueueConnection(String userName, String password)
  47. throws JMSException;
  48. }