|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.jms Interface TopicConnectionFactory
- All Superinterfaces:
- ConnectionFactory
- All Known Subinterfaces:
- XATopicConnectionFactory
public interface TopicConnectionFactory
- extends ConnectionFactory
客户端使用
TopicConnectionFactory
对象创建具有发布/订阅 JMS 提供者的 TopicConnection
对象。
TopicConnectionFactory
可用于创建 TopicConnection
,可以从 TopicConnection
中创建专门的与主题有关的对象。一种更常用且建议采用的方法是使用 ConnectionFactory
对象。
应该使用 TopicConnectionFactory
对象支持现有代码。
version |
| |
See also | javax.jms.ConnectionFactory |
A client uses a TopicConnectionFactory
object to create
TopicConnection
objects with a publish/subscribe JMS provider.
A TopicConnectionFactory
can be used to create a
TopicConnection
, from which specialized topic-related objects
can be created. A more general, and recommended approach
is to use the ConnectionFactory
object.
The TopicConnectionFactory
object
should be used to support existing code.
- Version:
- 1.1 - February 2, 2002
- Author:
- Mark Hapner, Rich Burridge, Kate Stout
- See Also:
ConnectionFactory
Method Summary | |
---|---|
TopicConnection |
createTopicConnection()
Creates a topic connection with the default user identity. |
TopicConnection |
createTopicConnection(String userName,
String password)
Creates a topic connection with the specified user identity. |
Methods inherited from interface javax.jms.ConnectionFactory |
---|
createConnection, createConnection |
Method Detail |
---|
public TopicConnection
createTopicConnection() throws JMSException
创建带有默认用户身份的主题连接。以停止模式创建连接。在显式调用 Connection.start
方法前,不会传送任何消息。
return | 新建的主题连接 |
Throws | JMSException: 如果 JMS 提供者由于某个内部错误无法创建主题连接。 |
Throws | JMSSecurityException: 如果客户端验证由于无效用户名或密码失败。 |
createTopicConnection
TopicConnection createTopicConnection() throws JMSException
- Creates a topic connection with the default user identity.
The connection is created in stopped mode. No messages
will be delivered until the
Connection.start
method is explicitly called. - Returns:
- a newly created topic connection
- Throws:
JMSException
- if the JMS provider fails to create a topic connection due to some internal error.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
public TopicConnection
createTopicConnection(String userName, String password) throws JMSException
创建带有指定用户身份的主题连接。以停止模式创建连接。在显式调用 Connection.start
方法前,不会传送任何消息。
userName | 调用者的用户名 |
password | 调用者的密码 |
return | 新建的主题连接 |
Throws | JMSException: 如果 JMS 提供者由于某个内部错误无法创建主题连接。 |
Throws | JMSSecurityException: 如果客户端验证由于无效用户名或密码失败。 |
createTopicConnection
TopicConnection createTopicConnection(String userName, String password) throws JMSException
- Creates a topic connection with the specified user identity.
The connection is created in stopped mode. No messages
will be delivered until the
Connection.start
method is explicitly called. - Parameters:
userName
- the caller's user namepassword
- the caller's password- Returns:
- a newly created topic connection
- Throws:
JMSException
- if the JMS provider fails to create a topic connection due to some internal error.JMSSecurityException
- if client authentication fails due to an invalid user name or password.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!