Tabnine Logo
SubscriptionInfo.setClientId
Code IndexAdd Tabnine to your IDE (free)

How to use
setClientId
method
in
org.apache.activemq.command.SubscriptionInfo

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

Refine searchRefine arrow

  • SubscriptionInfo.setSelector
  • SubscriptionInfo.setDestination
  • SubscriptionInfo.setSubscribedDestination
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

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
  super.tightUnmarshal(wireFormat, o, dataIn, bs);
  SubscriptionInfo info = (SubscriptionInfo)o;
  info.setClientId(tightUnmarshalString(dataIn, bs));
  info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
  info.setSelector(tightUnmarshalString(dataIn, bs));
  info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
}
origin: org.apache.activemq/activemq-all

  protected List<SubscriptionInfo> lookupSubscription(String clientId) throws MQTTProtocolException {
    List<SubscriptionInfo> result = new ArrayList<SubscriptionInfo>();
    RegionBroker regionBroker;

    try {
      regionBroker = (RegionBroker) brokerService.getBroker().getAdaptor(RegionBroker.class);
    } catch (Exception e) {
      throw new MQTTProtocolException("Error recovering durable subscriptions: " + e.getMessage(), false, e);
    }

    final TopicRegion topicRegion = (TopicRegion) regionBroker.getTopicRegion();
    List<DurableTopicSubscription> subscriptions = topicRegion.lookupSubscriptions(clientId);
    if (subscriptions != null) {
      for (DurableTopicSubscription subscription : subscriptions) {
        LOG.debug("Recovered durable sub:{} on connect", subscription);

        SubscriptionInfo info = new SubscriptionInfo();

        info.setDestination(subscription.getActiveMQDestination());
        info.setSubcriptionName(subscription.getSubscriptionKey().getSubscriptionName());
        info.setClientId(clientId);

        result.add(info);
      }
    }

    return result;
  }
}
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

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
  super.tightUnmarshal(wireFormat, o, dataIn, bs);
  SubscriptionInfo info = (SubscriptionInfo)o;
  info.setClientId(tightUnmarshalString(dataIn, bs));
  info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
  info.setSelector(tightUnmarshalString(dataIn, bs));
  info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
}
origin: org.apache.activemq/activemq-mqtt

  protected List<SubscriptionInfo> lookupSubscription(String clientId) throws MQTTProtocolException {
    List<SubscriptionInfo> result = new ArrayList<SubscriptionInfo>();
    RegionBroker regionBroker;

    try {
      regionBroker = (RegionBroker) brokerService.getBroker().getAdaptor(RegionBroker.class);
    } catch (Exception e) {
      throw new MQTTProtocolException("Error recovering durable subscriptions: " + e.getMessage(), false, e);
    }

    final TopicRegion topicRegion = (TopicRegion) regionBroker.getTopicRegion();
    List<DurableTopicSubscription> subscriptions = topicRegion.lookupSubscriptions(clientId);
    if (subscriptions != null) {
      for (DurableTopicSubscription subscription : subscriptions) {
        LOG.debug("Recovered durable sub:{} on connect", subscription);

        SubscriptionInfo info = new SubscriptionInfo();

        info.setDestination(subscription.getActiveMQDestination());
        info.setSubcriptionName(subscription.getSubscriptionKey().getSubscriptionName());
        info.setClientId(clientId);

        result.add(info);
      }
    }

    return result;
  }
}
origin: apache/activemq

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
  super.looseUnmarshal(wireFormat, o, dataIn);
  SubscriptionInfo info = (SubscriptionInfo)o;
  info.setClientId(looseUnmarshalString(dataIn));
  info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
  info.setSelector(looseUnmarshalString(dataIn));
  info.setSubscriptionName(looseUnmarshalString(dataIn));
  info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
}
origin: apache/activemq

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
  super.looseUnmarshal(wireFormat, o, dataIn);
  SubscriptionInfo info = (SubscriptionInfo)o;
  info.setClientId(looseUnmarshalString(dataIn));
  info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
  info.setSelector(looseUnmarshalString(dataIn));
  info.setSubscriptionName(looseUnmarshalString(dataIn));
}
origin: apache/activemq

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
  super.tightUnmarshal(wireFormat, o, dataIn, bs);
  SubscriptionInfo info = (SubscriptionInfo)o;
  info.setClientId(tightUnmarshalString(dataIn, bs));
  info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
  info.setSelector(tightUnmarshalString(dataIn, bs));
  info.setSubcriptionName(tightUnmarshalString(dataIn, bs));
  info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
}
origin: apache/activemq

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
  super.looseUnmarshal(wireFormat, o, dataIn);
  SubscriptionInfo info = (SubscriptionInfo)o;
  info.setClientId(looseUnmarshalString(dataIn));
  info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
  info.setSelector(looseUnmarshalString(dataIn));
  info.setSubscriptionName(looseUnmarshalString(dataIn));
}
origin: apache/activemq

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
  super.tightUnmarshal(wireFormat, o, dataIn, bs);
  SubscriptionInfo info = (SubscriptionInfo)o;
  info.setClientId(tightUnmarshalString(dataIn, bs));
  info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
  info.setSelector(tightUnmarshalString(dataIn, bs));
  info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
  info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
}
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

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
  super.looseUnmarshal(wireFormat, o, dataIn);
  SubscriptionInfo info = (SubscriptionInfo)o;
  info.setClientId(looseUnmarshalString(dataIn));
  info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
  info.setSelector(looseUnmarshalString(dataIn));
  info.setSubscriptionName(looseUnmarshalString(dataIn));
  info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
}
origin: apache/activemq

  info.setClientId(context.getClientId());
  info.setSubscriptionName(sub.getConsumerInfo().getSubscriptionName());
  info.setDestination(sub.getConsumerInfo().getDestination());
  info.setSelector(sub.getSelector());
  addInactiveSubscription(key, info, sub);
} else {
origin: apache/activemq

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
  super.looseUnmarshal(wireFormat, o, dataIn);
  SubscriptionInfo info = (SubscriptionInfo)o;
  info.setClientId(looseUnmarshalString(dataIn));
  info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
  info.setSelector(looseUnmarshalString(dataIn));
  info.setSubcriptionName(looseUnmarshalString(dataIn));
  info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
  info.setNoLocal(dataIn.readBoolean());
}
origin: org.apache.activemq/activemq-client

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
  super.tightUnmarshal(wireFormat, o, dataIn, bs);
  SubscriptionInfo info = (SubscriptionInfo)o;
  info.setClientId(tightUnmarshalString(dataIn, bs));
  info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
  info.setSelector(tightUnmarshalString(dataIn, bs));
  info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
}
origin: apache/activemq

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
  super.looseUnmarshal(wireFormat, o, dataIn);
  SubscriptionInfo info = (SubscriptionInfo)o;
  info.setClientId(looseUnmarshalString(dataIn));
  info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
  info.setSelector(looseUnmarshalString(dataIn));
  info.setSubscriptionName(looseUnmarshalString(dataIn));
  info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
}
origin: org.apache.activemq/activemq-all

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
  super.tightUnmarshal(wireFormat, o, dataIn, bs);
  SubscriptionInfo info = (SubscriptionInfo)o;
  info.setClientId(tightUnmarshalString(dataIn, bs));
  info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
  info.setSelector(tightUnmarshalString(dataIn, bs));
  info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
}
origin: apache/activemq

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
  super.tightUnmarshal(wireFormat, o, dataIn, bs);
  SubscriptionInfo info = (SubscriptionInfo)o;
  info.setClientId(tightUnmarshalString(dataIn, bs));
  info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
  info.setSelector(tightUnmarshalString(dataIn, bs));
  info.setSubcriptionName(tightUnmarshalString(dataIn, bs));
  info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
}
origin: org.apache.activemq/activemq-client

/**
 * Un-marshal an object instance from the data input stream
 *
 * @param o the object to un-marshal
 * @param dataIn the data input stream to build the object from
 * @throws IOException
 */
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
  super.looseUnmarshal(wireFormat, o, dataIn);
  SubscriptionInfo info = (SubscriptionInfo)o;
  info.setClientId(looseUnmarshalString(dataIn));
  info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
  info.setSelector(looseUnmarshalString(dataIn));
  info.setSubscriptionName(looseUnmarshalString(dataIn));
}
org.apache.activemq.commandSubscriptionInfosetClientId

Popular methods of SubscriptionInfo

  • getClientId
  • getSubscriptionName
  • <init>
  • getSelector
  • 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

  • Parsing JSON documents to java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (Timer)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top plugins for WebStorm
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