Tabnine Logo
SubscriptionInfo.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.activemq.command.SubscriptionInfo
constructor

Best Java code snippets using org.apache.activemq.command.SubscriptionInfo.<init> (Showing top 20 results out of 315)

origin: apache/activemq

/**
 * @return a new object instance
 */
public DataStructure createObject() {
  return new SubscriptionInfo();
}
origin: apache/activemq

/**
 * @return a new object instance
 */
public DataStructure createObject() {
  return new SubscriptionInfo();
}
origin: apache/activemq

/**
 * @return a new object instance
 */
public DataStructure createObject() {
  return new SubscriptionInfo();
}
origin: apache/activemq

/**
 * @return a new object instance
 */
public DataStructure createObject() {
  return new SubscriptionInfo();
}
origin: apache/activemq

/**
 * @return a new object instance
 */
public DataStructure createObject() {
  return new SubscriptionInfo();
}
origin: apache/activemq

/**
 * @return a new object instance
 */
public DataStructure createObject() {
  return new SubscriptionInfo();
}
origin: apache/activemq

/**
 * @return a new object instance
 */
public DataStructure createObject() {
  return new SubscriptionInfo();
}
origin: apache/activemq

/**
 * @return a new object instance
 */
public DataStructure createObject() {
  return new SubscriptionInfo();
}
origin: apache/activemq

/**
 * @return a new object instance
 */
public DataStructure createObject() {
  return new SubscriptionInfo();
}
origin: apache/activemq

/**
 * This scenaior is primarily used for durable sync on broker restarts
 *
 * @param sub
 * @param clientId
 * @param subName
 */
protected void addProxyNetworkSubscriptionClientId(final DemandSubscription sub, final String clientId, String subName) {
  if (clientId != null && sub != null && subName != null) {
      String newClientId = getProxyBridgeClientId(clientId);
      final SubscriptionInfo newSubInfo = new SubscriptionInfo(newClientId, subName);
      sub.getDurableRemoteSubs().add(newSubInfo);
      LOG.debug("Adding proxy network subscription {} to demand subscription", newSubInfo);
  } else {
    LOG.debug("Skipping addProxyNetworkSubscription");
  }
}
origin: apache/activemq

@Override
public SubscriptionInfo[] doGetAllSubscriptions(TransactionContext c, ActiveMQDestination destination)
    throws SQLException, IOException {
  PreparedStatement s = null;
  ResultSet rs = null;
  try {
    s = c.getConnection().prepareStatement(this.statements.getFindAllDurableSubsStatement());
    s.setString(1, destination.getQualifiedName());
    rs = s.executeQuery();
    ArrayList<SubscriptionInfo> rc = new ArrayList<SubscriptionInfo>();
    while (rs.next()) {
      SubscriptionInfo subscription = new SubscriptionInfo();
      subscription.setDestination(destination);
      subscription.setSelector(rs.getString(1));
      subscription.setSubscriptionName(rs.getString(2));
      subscription.setClientId(rs.getString(3));
      subscription.setSubscribedDestination(ActiveMQDestination.createDestination(rs.getString(4),
          ActiveMQDestination.QUEUE_TYPE));
      rc.add(subscription);
    }
    return rc.toArray(new SubscriptionInfo[rc.size()]);
  } finally {
    close(rs);
    close(s);
  }
}
origin: apache/activemq

/**
 * Add a durable remote proxy subscription when we can generate via the BrokerId path
 * This is the most common scenario
 *
 * @param sub
 * @param path
 * @param subName
 */
protected void addProxyNetworkSubscriptionBrokerPath(final DemandSubscription sub, final BrokerId[] path, String subName) {
  if (sub != null && path.length > 1 && subName != null) {
    String b1 = path[path.length-1].toString();
    String b2 = path[path.length-2].toString();
    final SubscriptionInfo newSubInfo = new SubscriptionInfo(b2 + configuration.getClientIdToken() + "inbound" + configuration.getClientIdToken() + b1, subName);
    sub.getDurableRemoteSubs().add(newSubInfo);
  }
}
origin: apache/activemq

@Override
public SubscriptionInfo doGetSubscriberEntry(TransactionContext c, ActiveMQDestination destination,
    String clientId, String subscriptionName) throws SQLException, IOException {
  PreparedStatement s = null;
  ResultSet rs = null;
  try {
    s = c.getConnection().prepareStatement(this.statements.getFindDurableSubStatement());
    s.setString(1, destination.getQualifiedName());
    s.setString(2, clientId);
    s.setString(3, subscriptionName);
    rs = s.executeQuery();
    if (!rs.next()) {
      return null;
    }
    SubscriptionInfo subscription = new SubscriptionInfo();
    subscription.setDestination(destination);
    subscription.setClientId(clientId);
    subscription.setSubscriptionName(subscriptionName);
    subscription.setSelector(rs.getString(1));
    subscription.setSubscribedDestination(ActiveMQDestination.createDestination(rs.getString(2),
        ActiveMQDestination.QUEUE_TYPE));
    return subscription;
  } finally {
    close(rs);
    close(s);
  }
}
origin: apache/activemq

protected void unregisterSubscription(ObjectName key, boolean addToInactive) throws Exception {
  queueSubscribers.remove(key);
  topicSubscribers.remove(key);
  temporaryQueueSubscribers.remove(key);
  temporaryTopicSubscribers.remove(key);
  if (registeredMBeans.remove(key)) {
    try {
      managementContext.unregisterMBean(key);
    } catch (Throwable e) {
      LOG.warn("Failed to unregister MBean {}", key);
      LOG.debug("Failure reason: ", e);
    }
  }
  DurableSubscriptionView view = (DurableSubscriptionView)durableTopicSubscribers.remove(key);
  if (view != null) {
    // need to put this back in the inactive list
    SubscriptionKey subscriptionKey = new SubscriptionKey(view.getClientId(), view.getSubscriptionName());
    if (addToInactive) {
      SubscriptionInfo info = new SubscriptionInfo();
      info.setClientId(subscriptionKey.getClientId());
      info.setSubscriptionName(subscriptionKey.getSubscriptionName());
      info.setDestination(new ActiveMQTopic(view.getDestinationName()));
      info.setSelector(view.getSelector());
      addInactiveSubscription(subscriptionKey, info, (brokerService.isKeepDurableSubsActive() ? view.subscription : null));
    }
  }
}
origin: apache/activemq

final SubscriptionInfo subscriptionInfo = new SubscriptionInfo(info.getClientId(), info.getSubscriptionName());
final boolean proxyBridgeSub = isProxyBridgeSubscription(subscriptionInfo.getClientId(),
    subscriptionInfo.getSubscriptionName());
origin: apache/activemq

protected void configureDemandSubscription(ConsumerInfo info, DemandSubscription sub) throws IOException {
  if (AdvisorySupport.isConsumerAdvisoryTopic(info.getDestination()) ||
      AdvisorySupport.isVirtualDestinationConsumerAdvisoryTopic(info.getDestination())) {
    sub.getLocalInfo().setDispatchAsync(true);
  } else {
    sub.getLocalInfo().setDispatchAsync(configuration.isDispatchAsync());
  }
  configureConsumerPrefetch(sub.getLocalInfo());
  subscriptionMapByLocalId.put(sub.getLocalInfo().getConsumerId(), sub);
  subscriptionMapByRemoteId.put(sub.getRemoteInfo().getConsumerId(), sub);
  sub.setNetworkBridgeFilter(createNetworkBridgeFilter(info));
  if (!info.isDurable()) {
    // This works for now since we use a VM connection to the local broker.
    // may need to change if we ever subscribe to a remote broker.
    sub.getLocalInfo().setAdditionalPredicate(sub.getNetworkBridgeFilter());
  } else {
    sub.setLocalDurableSubscriber(new SubscriptionInfo(info.getClientId(), info.getSubscriptionName()));
  }
}
origin: apache/activemq

info = new SubscriptionInfo();
info.setClientId(clientId);
info.setSelector(subscription.getConsumerInfo().getSelector());
origin: apache/activemq

  addProxyNetworkSubscriptionClientId(ds, info.getClientId(), info.getSubscriptionName());
} else {
  ds.getDurableRemoteSubs().add(new SubscriptionInfo(info.getClientId(), info.getSubscriptionName()));
origin: apache/activemq

protected void addConsumerInfo(final ConsumerInfo consumerInfo) throws IOException {
  ConsumerInfo info = consumerInfo.copy();
  addRemoteBrokerToBrokerPath(info);
  DemandSubscription sub = createDemandSubscription(info);
  if (sub != null) {
    if (duplicateSuppressionIsRequired(sub)) {
      undoMapRegistration(sub);
    } else {
      if (consumerInfo.isDurable()) {
        //Handle the demand generated by proxy network subscriptions
        //The broker path is case is normal
        if (isProxyNSConsumerBrokerPath(sub.getRemoteInfo()) &&
            info.getSubscriptionName() != null && info.getSubscriptionName().startsWith(DURABLE_SUB_PREFIX)) {
          final BrokerId[] path = info.getBrokerPath();
          addProxyNetworkSubscriptionBrokerPath(sub, path, consumerInfo.getSubscriptionName());
        //This is the durable sync case on broker restart
        } else if (isProxyNSConsumerClientId(sub.getRemoteInfo().getClientId()) &&
            isProxyBridgeSubscription(info.getClientId(), info.getSubscriptionName())) {
          addProxyNetworkSubscriptionClientId(sub, sub.getRemoteInfo().getClientId(), consumerInfo.getSubscriptionName());
        } else {
          sub.getDurableRemoteSubs().add(new SubscriptionInfo(sub.getRemoteInfo().getClientId(), consumerInfo.getSubscriptionName()));
        }
      }
      addSubscription(sub);
      LOG.debug("{} new demand subscription: {}", configuration.getBrokerName(), sub);
    }
  }
}
origin: apache/activemq

if (sub.getConsumerInfo().getConsumerId().getConnectionId().equals("OFFLINE")) {
  SubscriptionInfo info = new SubscriptionInfo();
  info.setClientId(context.getClientId());
  info.setSubscriptionName(sub.getConsumerInfo().getSubscriptionName());
org.apache.activemq.commandSubscriptionInfo<init>

Popular methods of SubscriptionInfo

  • getClientId
  • getSubscriptionName
  • getSelector
  • setClientId
  • setDestination
  • getDestination
    This is the a resolved destination that the subscription is receiving messages from. This will never
  • getSubscribedDestination
    The destination the client originally subscribed to.. This may not match the getDestination method i
  • setSelector
  • setSubscribedDestination
  • setSubscriptionName
  • getSubcriptionName
  • setSubcriptionName
  • getSubcriptionName,
  • setSubcriptionName,
  • isNoLocal,
  • setNoLocal

Popular in Java

  • Making http requests using okhttp
  • compareTo (BigDecimal)
  • getContentResolver (Context)
  • setContentView (Activity)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Join (org.hibernate.mapping)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now