/*
 * ICESOFT COMMERCIAL SOURCE CODE LICENSE V 1.1
 *
 * The contents of this file are subject to the ICEsoft Commercial Source
 * Code License Agreement V1.1 (the "License"); you may not use this file
 * except in compliance with the License. You may obtain a copy of the
 * License at
 * http://www.icesoft.com/license/commercial-source-v1.1.html
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations under
 * the License.
 *
 * Copyright 2009-2015 ICEsoft Technologies Canada, Corp. All Rights Reserved.
 */
package com.icesoft.net.messaging.jms;

import com.icesoft.net.messaging.MessageServiceConfiguration;

import javax.naming.Context;

public interface JMSProviderConfiguration
extends MessageServiceConfiguration {
    /**
     * <p>
     *   The environment property name for the initial context factory to use: <code>java.naming.factory.initial</code>.
     * </p>
     */
    public static final String INITIAL_CONTEXT_FACTORY = Context.INITIAL_CONTEXT_FACTORY;

    public static final String PASSWORD = "com.icesoft.net.messaging.jms.password";

    /**
     * <p>
     *   The environment property name for the URL to the service provider to use:
     *   <code>java.naming.provider.url</code>.
     * </p>
     */
    public static final String PROVIDER_URL = Context.PROVIDER_URL;
    public static final String RECEIVE_TIMEOUT = "com.icesoft.net.messaging.jms.receiveTimeout";
    public static final String SECURITY_CREDENTIALS = Context.SECURITY_CREDENTIALS;
    public static final String SECURITY_PRINCIPAL = Context.SECURITY_PRINCIPAL;
    /**
     * <p>
     *   The environment property name for the topic connection factory name to use:
     *   <code>com.icesoft.net.messaging.jms.topicConnectionFactoryName</code>.
     * </p>
     */
    public static final String TOPIC_CONNECTION_FACTORY_NAME =
        "com.icesoft.net.messaging.jms.topicConnectionFactoryName";
    /**
     * <p>
     *   The environment property name for the topic name prefix to use when looking up the topics:
     *   <code>com.icesoft.net.messaging.jms.topicNamePrefix</code>.
     * </p>
     */
    public static final String TOPIC_NAME_PREFIX = "com.icesoft.net.messaging.jms.topicNamePrefix";
    /**
     * <p>
     *   The environment property name for the list of package prefixes to use when loading in URL context factories:
     *   <code>java.naming.factory.url.pkgs</code>.
     * </p>
     */
    public static final String URL_PACKAGE_PREFIXES = Context.URL_PKG_PREFIXES;

    public static final String USER_NAME = "com.icesoft.net.messaging.jms.userName";

    /**
     * <p>
     *   Convenience method for getting the property value containing the initial context factory to use.  Invoking this
     *   method is the same as invoking <code>get(INITIAL_CONTEXT_FACTORY)</code>.
     * </p>
     *
     * @return     the property value containing the initial context factory to use.
     */
    String getInitialContextFactory();

    String getPassword();

    /**
     * <p>
     *   Convenience method for getting the property value containing the URL to the service provider to use.  Invoking
     *   this method is the same as invoking <code>get(PROVIDER_URL)</code>.
     * </p>
     *
     * @return     the property value containing the URL to the service provider to use.
     */
    String getProviderURL();

    long getReceiveTimeout();

    String getSecurityCredentials();

    String getSecurityPrincipal();

    /**
     * <p>
     *   Convenience method for getting the property value containing the topic connection factory name to use.
     *   Invoking this method is the same as invoking <code>get(TOPIC_CONNECTION_FACTORY_NAME)</code>.
     * </p>
     *
     * @return     the property value containing the topic connection factory name to use.
     */
    String getTopicConnectionFactoryName();

    /**
     * <p>
     *   Convenience method for getting the property value containing the topic name prefix to use.  Invoking this
     *   method is the same as invoking <code>get(TOPIC_NAME_PREFIX)</code>.
     * </p>
     *
     * @return     the property value containing the topic name prefix to use.
     */
    String getTopicNamePrefix();

    /**
     * <p>
     *   Convenience method for getting the property value containing the URL to the list of package prefixes to use.
     *   Invoking this method is the same as invoking <code>get(URL_PACKAGE_PREFIXES)</code>.
     * </p>
     *
     * @return     the property value containing the URL to the list of package prefixes to use.
     */
    String getURLPackagePrefixes();

    String getUserName();
}
