public static boolean isDestForcedDurable(final ActiveMQDestination destination) { boolean isForceDurable = false; if (destination != null) { final Map<String, String> options = destination.getOptions(); if (options != null) { isForceDurable = (boolean) TypeConversionSupport.convert(options.get("forceDurable"), boolean.class); } } return isForceDurable; } }
if (e instanceof ActiveMQDestination) { ActiveMQDestination destination = (ActiveMQDestination) e; if (includeOptions && destination.getOptions() != null) { try { new URI(""), destination.getOptions())); } catch (URISyntaxException e1) { sb.append(destination);
@Override public String getOptions() { Map<String, String> options = destination.getActiveMQDestination().getOptions(); String optionsString = ""; try { if (options != null) { optionsString = URISupport.createQueryString(options); } } catch (URISyntaxException ignored) {} return optionsString; }
public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages, boolean noLocal) throws JMSException { checkClosedOrFailed(); ensureConnectionInfoSent(); ConsumerId consumerId = createConsumerId(); ConsumerInfo consumerInfo = new ConsumerInfo(consumerId); consumerInfo.setDestination(ActiveMQMessageTransformation.transformDestination(destination)); consumerInfo.setSelector(messageSelector); consumerInfo.setPrefetchSize(maxMessages); consumerInfo.setNoLocal(noLocal); consumerInfo.setDispatchAsync(isDispatchAsync()); // Allows the options on the destination to configure the consumerInfo if (consumerInfo.getDestination().getOptions() != null) { Map<String, String> options = new HashMap<>(consumerInfo.getDestination().getOptions()); IntrospectionSupport.setProperties(consumerInfo, options, "consumer."); } return new ActiveMQConnectionConsumer(this, sessionPool, consumerInfo); }
this.info.setWindowSize(session.connection.getProducerWindowSize()); if (destination != null && destination.getOptions() != null) { Map<String, Object> options = IntrospectionSupport.extractProperties( new HashMap<String, Object>(destination.getOptions()), "producer."); IntrospectionSupport.setProperties(this.info, options); if (options.size() > 0) {
if (info.getDestination().getOptions() != null) { Map<String, String> options = new HashMap<>(info.getDestination().getOptions()); IntrospectionSupport.setProperties(this.info, options, "consumer.");
if (dest.getOptions() != null) { Map<String, Object> options = IntrospectionSupport.extractProperties( new HashMap<String, Object>(dest.getOptions()), "consumer."); IntrospectionSupport.setProperties(this.info, options); if (options.size() > 0) {
public static boolean isDestForcedDurable(final ActiveMQDestination destination) { boolean isForceDurable = false; if (destination != null) { final Map<String, String> options = destination.getOptions(); if (options != null) { isForceDurable = (boolean) TypeConversionSupport.convert(options.get("forceDurable"), boolean.class); } } return isForceDurable; } }
public static boolean isDestForcedDurable(final ActiveMQDestination destination) { boolean isForceDurable = false; if (destination != null) { final Map<String, String> options = destination.getOptions(); if (options != null) { isForceDurable = (boolean) TypeConversionSupport.convert(options.get("forceDurable"), boolean.class); } } return isForceDurable; } }
public static boolean isDestForcedDurable(final ActiveMQDestination destination) { boolean isForceDurable = false; if (destination != null) { final Map<String, String> options = destination.getOptions(); if (options != null) { isForceDurable = (boolean) TypeConversionSupport.convert(options.get("forceDurable"), boolean.class); } } return isForceDurable; } }
@Override public String getOptions() { Map<String, String> options = destination.getActiveMQDestination().getOptions(); String optionsString = ""; try { if (options != null) { optionsString = URISupport.createQueryString(options); } } catch (URISyntaxException ignored) {} return optionsString; }
@Override public String getOptions() { Map<String, String> options = destination.getActiveMQDestination().getOptions(); String optionsString = ""; try { if (options != null) { optionsString = URISupport.createQueryString(options); } } catch (URISyntaxException ignored) {} return optionsString; }
if (e instanceof ActiveMQDestination) { ActiveMQDestination destination = (ActiveMQDestination) e; if (includeOptions && destination.getOptions() != null) { try { new URI(""), destination.getOptions())); } catch (URISyntaxException e1) { sb.append(destination);
if (e instanceof ActiveMQDestination) { ActiveMQDestination destination = (ActiveMQDestination) e; if (includeOptions && destination.getOptions() != null) { try { new URI(""), destination.getOptions())); } catch (URISyntaxException e1) { sb.append(destination);
@Override public String getOptions() { Map<String, String> options = destination.getActiveMQDestination().getOptions(); String optionsString = ""; try { if (options != null) { optionsString = URISupport.createQueryString(options); } } catch (URISyntaxException ignored) {} return optionsString; }
public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages, boolean noLocal) throws JMSException { checkClosedOrFailed(); ensureConnectionInfoSent(); ConsumerId consumerId = createConsumerId(); ConsumerInfo consumerInfo = new ConsumerInfo(consumerId); consumerInfo.setDestination(ActiveMQMessageTransformation.transformDestination(destination)); consumerInfo.setSelector(messageSelector); consumerInfo.setPrefetchSize(maxMessages); consumerInfo.setNoLocal(noLocal); consumerInfo.setDispatchAsync(isDispatchAsync()); // Allows the options on the destination to configure the consumerInfo if (consumerInfo.getDestination().getOptions() != null) { Map<String, String> options = new HashMap<>(consumerInfo.getDestination().getOptions()); IntrospectionSupport.setProperties(consumerInfo, options, "consumer."); } return new ActiveMQConnectionConsumer(this, sessionPool, consumerInfo); }
public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages, boolean noLocal) throws JMSException { checkClosedOrFailed(); ensureConnectionInfoSent(); ConsumerId consumerId = createConsumerId(); ConsumerInfo consumerInfo = new ConsumerInfo(consumerId); consumerInfo.setDestination(ActiveMQMessageTransformation.transformDestination(destination)); consumerInfo.setSelector(messageSelector); consumerInfo.setPrefetchSize(maxMessages); consumerInfo.setNoLocal(noLocal); consumerInfo.setDispatchAsync(isDispatchAsync()); // Allows the options on the destination to configure the consumerInfo if (consumerInfo.getDestination().getOptions() != null) { Map<String, String> options = new HashMap<>(consumerInfo.getDestination().getOptions()); IntrospectionSupport.setProperties(consumerInfo, options, "consumer."); } return new ActiveMQConnectionConsumer(this, sessionPool, consumerInfo); }
public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages, boolean noLocal) throws JMSException { checkClosedOrFailed(); ensureConnectionInfoSent(); ConsumerId consumerId = createConsumerId(); ConsumerInfo consumerInfo = new ConsumerInfo(consumerId); consumerInfo.setDestination(ActiveMQMessageTransformation.transformDestination(destination)); consumerInfo.setSelector(messageSelector); consumerInfo.setPrefetchSize(maxMessages); consumerInfo.setNoLocal(noLocal); consumerInfo.setDispatchAsync(isDispatchAsync()); // Allows the options on the destination to configure the consumerInfo if (consumerInfo.getDestination().getOptions() != null) { Map<String, String> options = new HashMap<>(consumerInfo.getDestination().getOptions()); IntrospectionSupport.setProperties(consumerInfo, options, "consumer."); } return new ActiveMQConnectionConsumer(this, sessionPool, consumerInfo); }
public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages, boolean noLocal) throws JMSException { checkClosedOrFailed(); ensureConnectionInfoSent(); ConsumerId consumerId = createConsumerId(); ConsumerInfo consumerInfo = new ConsumerInfo(consumerId); consumerInfo.setDestination(ActiveMQMessageTransformation.transformDestination(destination)); consumerInfo.setSelector(messageSelector); consumerInfo.setPrefetchSize(maxMessages); consumerInfo.setNoLocal(noLocal); consumerInfo.setDispatchAsync(isDispatchAsync()); // Allows the options on the destination to configure the consumerInfo if (consumerInfo.getDestination().getOptions() != null) { Map<String, String> options = new HashMap<String, String>(consumerInfo.getDestination().getOptions()); IntrospectionSupport.setProperties(consumerInfo, options, "consumer."); } return new ActiveMQConnectionConsumer(this, sessionPool, consumerInfo); }
protected ActiveMQMessageProducer(ActiveMQSession session, ProducerId producerId, ActiveMQDestination destination, int sendTimeout) throws JMSException { super(session); this.info = new ProducerInfo(producerId); this.info.setWindowSize(session.connection.getProducerWindowSize()); if (destination != null && destination.getOptions() != null) { Map<String, String> options = new HashMap<String, String>(destination.getOptions()); IntrospectionSupport.setProperties(this.info, options, "producer."); } this.info.setDestination(destination); // Enable producer window flow control if protocol > 3 and the window // size > 0 if (session.connection.getProtocolVersion() >= 3 && this.info.getWindowSize() > 0) { producerWindow = new MemoryUsage("Producer Window: " + producerId); producerWindow.setExecutor(session.getConnectionExecutor()); producerWindow.setLimit(this.info.getWindowSize()); producerWindow.start(); } this.defaultDeliveryMode = Message.DEFAULT_DELIVERY_MODE; this.defaultPriority = Message.DEFAULT_PRIORITY; this.defaultTimeToLive = Message.DEFAULT_TIME_TO_LIVE; this.startTime = System.currentTimeMillis(); this.messageSequence = new AtomicLong(0); this.stats = new JMSProducerStatsImpl(session.getSessionStats(), destination); this.session.addProducer(this); this.session.asyncSendPacket(info); this.setSendTimeout(sendTimeout); setTransformer(session.getTransformer()); }