FileDocCategorySizeDatePackage
TopicConnector.javaAPI DocApache Axis 1.415241Sat Apr 22 18:57:28 BST 2006org.apache.axis.transport.jms

TopicConnector

public class TopicConnector extends JMSConnector
TopicConnector is a concrete JMSConnector subclass that specifically handles connections to topics (pub-sub domain).
author
Jaime Meritt (jmeritt@sonicsoftware.com)
author
Richard Chung (rchung@sonicsoftware.com)
author
Dave Chappell (chappell@sonicsoftware.com)

Fields Summary
Constructors Summary
public TopicConnector(javax.jms.TopicConnectionFactory factory, int numRetries, int numSessions, long connectRetryInterval, long interactRetryInterval, long timeoutTime, boolean allowReceive, String clientID, String username, String password, org.apache.axis.components.jms.JMSVendorAdapter adapter, JMSURLHelper jmsurl)

        super(factory, numRetries, numSessions, connectRetryInterval,
              interactRetryInterval, timeoutTime, allowReceive,
              clientID, username, password, adapter, jmsurl);
    
Methods Summary
protected AsyncConnectioncreateAsyncConnection(javax.jms.ConnectionFactory factory, javax.jms.Connection connection, java.lang.String threadName, java.lang.String clientID, java.lang.String username, java.lang.String password)

        return new TopicAsyncConnection((TopicConnectionFactory)factory,
                                        (TopicConnection)connection, threadName,
                                        clientID, username, password);
    
private javax.jms.TopicSubscribercreateDurableSubscriber(javax.jms.TopicSession session, javax.jms.Topic topic, java.lang.String subscriptionName, java.lang.String messageSelector, boolean noLocal)

        return session.createDurableSubscriber(topic, subscriptionName,
                                               messageSelector, noLocal);
    
public JMSEndpointcreateEndpoint(java.lang.String destination)

        return new TopicEndpoint(destination);
    
public JMSEndpointcreateEndpoint(javax.jms.Destination destination)
Create an endpoint for a queue destination.

param
destination
return
throws
JMSException

        if(!(destination instanceof Topic))
            throw new IllegalArgumentException("The input be a topic for this connector");
        return new TopicDestinationEndpoint((Topic)destination);
    
private javax.jms.TopicSubscribercreateSubscriber(javax.jms.TopicSession session, javax.jms.Topic topic, java.lang.String messageSelector, boolean noLocal)

        return session.createSubscriber(topic, messageSelector, noLocal);
    
private javax.jms.TopicSubscribercreateSubscriber(javax.jms.TopicSession session, org.apache.axis.transport.jms.TopicConnector$TopicSubscription subscription)

        if(subscription.isDurable())
            return createDurableSubscriber(session,
                        (Topic)subscription.m_endpoint.getDestination(session),
                        subscription.m_subscriptionName,
                        subscription.m_messageSelector,
                        subscription.m_noLocal);
        else
            return createSubscriber(session,
                        (Topic)subscription.m_endpoint.getDestination(session),
                        subscription.m_messageSelector,
                        subscription.m_noLocal);
    
protected SyncConnectioncreateSyncConnection(javax.jms.ConnectionFactory factory, javax.jms.Connection connection, int numSessions, java.lang.String threadName, java.lang.String clientID, java.lang.String username, java.lang.String password)

        return new TopicSyncConnection((TopicConnectionFactory)factory,
                                       (TopicConnection)connection, numSessions,
                                       threadName, clientID, username, password);
    
private javax.jms.TopiccreateTopic(javax.jms.TopicSession session, java.lang.String subject)

        return m_adapter.getTopic(session, subject);
    
private javax.jms.TopicSessioncreateTopicSession(javax.jms.TopicConnection connection, int ackMode)

        return connection.createTopicSession(false,
                                             ackMode);
    
protected javax.jms.ConnectioninternalConnect(javax.jms.ConnectionFactory connectionFactory, java.lang.String username, java.lang.String password)

        TopicConnectionFactory tcf = (TopicConnectionFactory)connectionFactory;
        if(username == null)
            return tcf.createTopicConnection();

        return tcf.createTopicConnection(username, password);