⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 profile.java

📁 jxta_src_2.41b jxta 2.41b 最新版源码 from www.jxta.org
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
        public final static String HTTP_OUTGOING_IS_ENABLED =                HTTP_OUTGOING + "/@enabled";                /**         * HTTP transport address: {@value}         */                public final static String HTTP_ADDRESS = HTTP + "/address";                /**         * HTTP transport port range: {@value}         */                public final static String HTTP_PORT_RANGE = HTTP_ADDRESS +                "/@range";                /**         * HTTP transport public address: {@value}         */                public final static String HTTP_PUBLIC_ADDRESS = HTTP +                "/publicAddress";                /**         * HTTP transport public address exclusive enabler: {@value}         */                public final static String HTTP_PUBLIC_ADDRESS_EXCLUSIVE_IS_ENABLED =                HTTP_PUBLIC_ADDRESS + "/@exclusive";                /**         * HTTP transport proxy: {@value}         */                public final static String HTTP_PROXY_ADDRESS = HTTP + "/proxy";                /**         * HTTP transport enabler: {@value}         */                public final static String HTTP_PROXY_IS_ENABLED = HTTP_PROXY_ADDRESS +                "/@enabled";                /**         * Service: {@value}         */                public final static String SERVICE = JXTA + "/service";                /**         * RendezVous service: {@value}         */                public final static String RENDEZVOUS_SERVICE = SERVICE + "/rendezVous";                /**         * RendezVous service enabler: {@value}         */                public final static String RENDEZVOUS_SERVICE_IS_ENABLED =                RENDEZVOUS_SERVICE + "/@enabled";                /**         * RendezVous configuration mode: {@value}         */                public final static String RENDEZVOUS_CONFIGURATION_MODE =                RENDEZVOUS_SERVICE + "/@mode";                /**         * RendezVous service auto start: {@value}         */                public final static String RENDEZVOUS_SERVICE_AUTO_START =                RENDEZVOUS_SERVICE + "/@autoStart";                /**         * RendezVous service auto start enabler: {@value}         */                public final static String RENDEZVOUS_SERVICE_AUTO_START_IS_ENABLED =                RENDEZVOUS_SERVICE + "/@enabled";                /**         * Relay service: {@value}         */                public final static String RELAY_SERVICE = SERVICE + "/relay";                /**         * Relay service enabler: {@value}         */                public final static String RELAY_SERVICE_IS_ENABLED = RELAY_SERVICE +                "/@enabled";                /**         * Relay service queue size: {@value}         */                public final static String RELAY_SERVICE_QUEUE_SIZE = RELAY_SERVICE +                "/@queueSize";                /**         * Relay service incoming: {@value}         */                public final static String RELAY_SERVICE_INCOMING = RELAY_SERVICE +                "/incoming";                /**         * Relay service incoming enabler: {@value}         */                public final static String RELAY_SERVICE_INCOMING_IS_ENABLED =                RELAY_SERVICE_INCOMING + "/@enabled";                /**         * Relay service incoming maximum connections: {@value}         */                public final static String RELAY_SERVICE_INCOMING_MAXIMUM =                RELAY_SERVICE_INCOMING + "/@maximum";                /**         * Relay service incoming lease: {@value}         */                public final static String RELAY_SERVICE_INCOMING_LEASE =                RELAY_SERVICE_INCOMING + "/@lease";                /**         * Relay service outgoing: {@value}         */                public final static String RELAY_SERVICE_OUTGOING = RELAY_SERVICE +                "/outgoing";                /**         * Relay service outgoing enabler: {@value}         */                public final static String RELAY_SERVICE_OUTGOING_IS_ENABLED =                RELAY_SERVICE_OUTGOING + "/@enabled";                /**         * Relay service outgoing maximum connections: {@value}         */                public final static String RELAY_SERVICE_OUTGOING_MAXIMUM =                RELAY_SERVICE_OUTGOING + "/@maximum";                /**         * Relay service outgoing lease: {@value}         */                public final static String RELAY_SERVICE_OUTGOING_LEASE =                RELAY_SERVICE_OUTGOING + "/@lease";                /**         * Endpoint: {@value}         */                public final static String ENDPOINT_SERVICE = SERVICE + "/endpoint";                /**         * Endpoint outgoing queue size: {@value}         */                public final static String ENDPOINT_SERVICE_QUEUE_SIZE = ENDPOINT_SERVICE +                "/@queueSize";                /**         * Proxy service: {@value}         */                public final static String PROXY_SERVICE = SERVICE + "/proxy";                /**         * Proxy enabler: {@value}         */                public final static String PROXY_SERVICE_IS_ENABLED = PROXY_SERVICE +                "/@enabled";                /**         * Configuration: {@value}         */                public final static String CONFIGURATION = JXTA + "/configuration";                /**         * Optimizer: {@value}         */                public final static String CONFIGURATION_OPTIMIZER = CONFIGURATION +            "/optimizer";                /**         * Optmizer Class: {@value}         */                public final static String CONFIGURATION_OPTIMIZER_CLASS =            CONFIGURATION_OPTIMIZER + "/@class";                /**         * Optmizer Property Name: {@value}         */                public final static String OPTIMIZER_PROPERTY_NAME = CONFIGURATION_OPTIMIZER +            "[@class=''{0}'']" + "/property/@name";                /**         * Optmizer Property Value: {@value}         */                public final static String OPTIMIZER_PROPERTY_VALUE= CONFIGURATION_OPTIMIZER +            "[@class=''{0}'']" + "/property[@name=''{1}'']";                        /**         * Validator: {@value}         */                public final static String CONFIGURATION_VALIDATOR = CONFIGURATION +            "/validator";                /**         * Validator Class: {@value}         */                public final static String CONFIGURATION_VALIDATOR_CLASS =            CONFIGURATION_VALIDATOR + "/@class";                /**         * Validator Property Name: {@value}         */                public final static String VALIDATOR_PROPERTY_NAME = CONFIGURATION_VALIDATOR +            "[@class=''{0}'']" + "/property/@name";                /**         * Validator Property Value: {@value}         */                public final static String VALIDATOR_PROPERTY_VALUE= CONFIGURATION_VALIDATOR +            "[@class=''{0}'']" + "/property[@name=''{1}'']";                        /**         * Constructor         */                private Key() {        }    }    /**     * Specifies the Profile basis.     */        protected final static Profile SEED = new Profile("seed.xml");    private final static String RESOURCE_BASE = "resources/";    private final static Logger LOG =            Logger.getLogger(Profile.class.getName());    private Resource profile = new Resource();    private static HashMap profiles;    // register various convenience profiles        static {        profiles = new HashMap();        profiles.put("Default", DEFAULT);        profiles.put("Edge", EDGE);        profiles.put("Super", SUPER);        profiles.put("Rendezvous", RENDEZVOUS);        profiles.put("Relay", RELAY);        profiles.put("Adhoc", ADHOC);        profiles.put("Local", LOCAL);    }    /**     * Accessor for a named Profile.     *     * @param   profile     profile name     * @return              associated Profile or the {@link net.jxta.ext.config.Profile#DEFAULT} if     *                      unresolvable      */        public static Profile get(String profile) {        profile = profile != null ? profile.trim() : profile;                Profile p = (Profile)profiles.get(profile);        return p != null ? p : DEFAULT;    }    /**     * Accessor for registered Profiles.     *     * @return      Profile ids     */        public static Iterator getProfiles() {        return profiles.keySet().iterator();    }    /**     * Add a Profile keyed by name.     *       * @param name      profile name     * @param profile   Profile to be added     */        public static void add(String name, Profile profile) {        if (null != name && null != profile) {            profiles.put(name, profile);        }                   }    /**     * Constructs a Profile that represents the contents of the provided     * {@link java.net.URI} location.     *     * @param   profile Profile location     */        public Profile(URI profile) {        if (profile != null) {            if (! profile.isAbsolute()) {                profile = Default.HOME_ADDRESS.resolve(profile);            }                    try {                this.profile.load(profile.toURL().openStream());            } catch (MalformedURLException mue) {                if (LOG.isEnabledFor(Level.ERROR)) {                    LOG.error("invalid resource location", mue);                }            } catch (IOException ioe) {                if (LOG.isEnabledFor(Level.ERROR)) {                    LOG.error("invalid resource location", ioe);                }            } catch (ResourceNotFoundException rnfe) {                if (LOG.isEnabledFor(Level.ERROR)) {                    LOG.error("invalid resource location", rnfe);                }            }        }    }        /**     * Constructs a Profile that represents the contents of the provided     * {@link java.net.URL} location.     *     * @deprecated use URI based constructor     * @param   profile Profile location     */        public Profile(URL profile) {        try {            this.profile.load(profile);        } catch (ResourceNotFoundException rnfe) {            if (LOG.isEnabledFor(Level.ERROR)) {                LOG.error("invalid resource location", rnfe);            }        }    }        /**     * Constructs a Profile that represents the contents of the provided     * {@link java.io.InputStream}.     *     * @param   is      Profile stream     */        public Profile(InputStream is) {         try {            this.profile.load(is);        } catch (ResourceNotFoundException rnfe) {            if (LOG.isEnabledFor(Level.ERROR)) {                LOG.error("invalid resource format", rnfe);            }        }    }    /**     * Accessor for the backing Profile resource.     *     * @return      Profile resource     */        protected Resource getProfile() {        return this.profile;    }    /**     * Constructor that represents the contents of the provided resource.     *     * @param   profile     Profile resource name     */        private Profile(String profile) {        try {            this.profile.load(RESOURCE_BASE + profile, Profile.class);        } catch (ResourceNotFoundException rnfe) {            if (LOG.isEnabledFor(Level.ERROR)) {                LOG.error("invalid resource location", rnfe);            }        }    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -