Constructor.
@param strQueueName Name of the queue.
@param strQueueType Type of queue - remote or local.
@param source usually the object sending or listening for the message, to reduce echos.
490897
public void init(String strQueueName, String strQueueType, Object source, Map<String,Object> properties)
    {
        m_mapMessageHeader = properties;
        m_mapMessageTransport = null;
        m_mapMessageInfo = null;
        super.init(strQueueName, MessageConstants.INTERNET_QUEUE, source, properties);
    }
976423
public void setRemoteQueue(InvocationRequestQueue remoteQueue) {
        this.remoteQueue = remoteQueue;
        InvocationRequest deferredRequest = helpRequest;
        sendRequest(loadRequest, false);
        sendRequest(deferredRequest, false);
    }
718627
public RemoteReceiveQueue createRemoteReceiveQueue(String strQueueName, String strQueueType) throws RemoteException
    {
        MessageManager messageManager = this.getEnvironment().getMessageManager(this.getApplication(), true);
        BaseMessageReceiver receiver = (BaseMessageReceiver)messageManager.getMessageQueue(strQueueName, strQueueType).getMessageReceiver();
        ReceiveQueueSession remoteQueue = new ReceiveQueueSession(this, receiver);
        return remoteQueue;
    }
171785
public void init(String strQueueName, String strQueueType, Object source, Map<String,Object> properties)
    {
        if (strQueueName == null)
            if ((strQueueType == null)
                || (strQueueType.equals(MessageConstants.INTRANET_QUEUE)))
        {
            strQueueType = MessageConstants.INTRANET_QUEUE;
            strQueueName = MessageConstants.RECORD_QUEUE_NAME;
        }
        if (strQueueType == null)
            strQueueType = MessageConstants.INTERNET_QUEUE;
        m_strQueueName = strQueueName;
        m_strQueueType = strQueueType;
        m_source = source;
        
        m_mxProperties = this.createNameValueTree(null, properties);
    }
467011
public StringBuffer process(StringBuffer source) {
        CharSequence result = process((CharSequence) source);
        if (result instanceof StringBuffer) {
            return (StringBuffer) result;
        } else {
            return new StringBuffer(result);
        }
    }
429323
public BaseMessageQueue getMessageQueue(String strQueueName, String strQueueType)
    {
        // Look up the message Queue!
        BaseMessageQueue messageQueue = (BaseMessageQueue)super.getMessageQueue(strQueueName, strQueueType);
        if (messageQueue != null)
            return messageQueue;
        Object server = null;
        boolean bCreateIfNotFound = false;
        if (((this.getApplication().getProperty(DBParams.REMOTE_HOST) != null) && (this.getApplication().getProperty(DBParams.REMOTE_HOST).length() > 0))
            || (this.getApplication().getProperty(DBParams.REMOTE_APP_NAME) != null))
                bCreateIfNotFound = true;   // If you explicitly specify a remote server, create the server if new.
        if (((BaseApplication)this.getApplication()).getEnvironment().getDefaultApplication() != null)
            if (!MessageConstants.LOCAL_QUEUE.equalsIgnoreCase(strQueueType))
                if ((!DBConstants.TRUE.equalsIgnoreCase(this.getApplication().getProperty(DBParams.MESSAGE_SERVER)))  // Don't try to get a remote message server if I am the remote message server
                    && (!DBParams.LOCAL.equalsIgnoreCase(this.getApplication().getProperty(DBParams.MESSAGE_SERVER))))
                        server = ((BaseApplication)this.getApplication()).getEnvironment().getDefaultApplication().getRemoteTask(null, null, bCreateIfNotFound);    // (remote)
        // This assumes that I only have a server for client processes (Should be correct).
        if (server != null)
            return new org.jbundle.base.message.core.dual.DualMessageQueue(this, strQueueName, strQueueType); // Handle remote and local
        else
            return new LocalMessageQueue(this, strQueueName);
    }
1091918
@Override
    public void setQueueName(String qName) throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setQueueName", qName);

        setDestName(qName);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setQueueName");
    }
998148
public void init(BaseMessageManager manager, String strQueueName, String strQueueType)
    {
        super.init(manager, strQueueName, strQueueType);
    }
535288
public void addCustomerSource(
            @NonNull String sourceId,
            @NonNull @Source.SourceType String sourceType,
            @Nullable SourceRetrievalListener listener) {
        final Map<String, Object> arguments = new HashMap<>();
        arguments.put(KEY_SOURCE, sourceId);
        arguments.put(KEY_SOURCE_TYPE, sourceType);

        final String operationId = UUID.randomUUID().toString();
        if (listener != null) {
            mSourceRetrievalListeners.put(operationId, listener);
        }
        mEphemeralKeyManager.retrieveEphemeralKey(operationId, ACTION_ADD_SOURCE, arguments);
    }
923518
@Override
    protected void initQueue(T queue, QueueSpec spec) throws Exception {
        queue.setKafkaClient(defaultKafkaClient).setProducerType(defaultProducerType)
                .setKafkaProducerProperties(defaultProducerProps)
                .setKafkaConsumerProperties(defaultConsumerProps);
        queue.setSendAsync(defaultSendAsync);

        String bootstrapServers = spec.getField(SPEC_FIELD_BOOTSTRAP_SERVERS);
        bootstrapServers = StringUtils.isBlank(bootstrapServers) ? defaultBootstrapServers
                : bootstrapServers;
        if (StringUtils.isBlank(bootstrapServers)) {
            throw new IllegalArgumentException(
                    "Empty or Invalid value for param [" + SPEC_FIELD_BOOTSTRAP_SERVERS + "]!");
        }
        queue.setKafkaBootstrapServers(bootstrapServers);

        String consumerGroupId = spec.getField(SPEC_FIELD_CONSUMER_GROUP_ID);
        consumerGroupId = StringUtils.isBlank(consumerGroupId) ? defaultConsumerGroupId
                : consumerGroupId;
        if (!StringUtils.isBlank(consumerGroupId)) {
            queue.setConsumerGroupId(consumerGroupId);
        }

        String topicName = spec.getField(SPEC_FIELD_TOPIC);
        topicName = StringUtils.isBlank(topicName) ? defaultTopicName : topicName;
        if (StringUtils.isBlank(topicName)) {
            throw new IllegalArgumentException(
                    "Empty or Invalid value for param [" + SPEC_FIELD_TOPIC + "]!");
        }
        queue.setTopicName(topicName);

        String producerTypeStr = spec.getField(SPEC_FIELD_PRODUCER_TYPE);
        if (!StringUtils.isBlank(producerTypeStr)) {
            try {
                ProducerType producerType = ProducerType.valueOf(producerTypeStr);
                if (producerType != null) {
                    queue.setProducerType(producerType);
                }
            } catch (Exception e) {
            }
        }

        Properties producerProps = spec.getField(SPEC_FIELD_PRODUCER_PROPERTIES, Properties.class);
        if (producerProps != null) {
            queue.setKafkaProducerProperties(producerProps);
        }

        Properties consumerProps = spec.getField(SPEC_FIELD_CONSUMER_PROPERTIES, Properties.class);
        if (consumerProps != null) {
            queue.setKafkaConsumerProperties(consumerProps);
        }

        Boolean sendAsync = spec.getField(SPEC_FIELD_SEND_ASYNC, Boolean.class);
        if (sendAsync != null) {
            queue.setSendAsync(sendAsync.booleanValue());
        }

        super.initQueue(queue, spec);
    }
1123032
public static <T> Reference<T> create(ReferenceType type, T referent, ReferenceQueue<T> queue) {
		switch (type) {
		case SOFT:
			return new SoftReference<>(referent);
		case WEAK:
			return new WeakReference<>(referent);
		case PHANTOM:
			return new PhantomReference<T>(referent, queue);
		default:
			return null;
		}
	}
307489
@Override
	public void queueDeployed(LocalQueue queue)
    {
    	try
    	{
    		if (jmxAgent != null)
    			jmxAgent.register(new ObjectName(JMXAgent.JMX_DOMAIN+":type=Engines,engine="+engine.getName()+",children=queues,name="+queue.getName()), queue);
    	}
    	catch (Exception e)
    	{
    		log.error("Cannot register local queue on JMX agent",e);
    	}
    }
186544
@Override
    public java.util.concurrent.Future<GetQueueUrlResult> getQueueUrlAsync(String queueName,
            com.amazonaws.handlers.AsyncHandler<GetQueueUrlRequest, GetQueueUrlResult> asyncHandler) {

        return getQueueUrlAsync(new GetQueueUrlRequest().withQueueName(queueName), asyncHandler);
    }
866942
@SuppressWarnings("unchecked")
  public T queue(String name, Queue<?> queue) {
    for (Element e : elements()) {
      replacequeue(e, name, queue);
    }
    return (T) this;
  }
185612
function Queue (name, redisClient) {
  this.hasQuit = false
  this._name = name
  this.redisClient = redisClient
  this._key = Queue.PREFIX + this.name
}
1118868
function flushTypeQueue() {
            forEach(typeQueue, function (type) {
                if (UrlMatcher.prototype.$types[type.name]) {
                    throw new Error("A type named '" + type.name + "' has already been defined.");
                }
                var def = new Type(isInjectable(type.def) ? injector.invoke(type.def) : type.def);
                UrlMatcher.prototype.$types[type.name] = def;
            });
        }
1298050
@Override
    public Queue createQueue(String queueName) throws JMSRuntimeException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "createQueue", new Object[] { queueName });

        Queue queue = null;
        try {
            queue = jmsSession.createQueue(queueName);
        } catch (JMSException jmse) {
            throw (JMSRuntimeException) JmsErrorUtils.getJMS2Exception(jmse, JMSRuntimeException.class);
        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "createQueue", new Object[] { queue });
        }

        return queue;
    }