source: branches/objectmq-1.0/src/omq/common/util/Environment.java @ 33

Last change on this file since 33 was 33, checked in by amoreno, 11 years ago

new release version

File size: 781 bytes
Line 
1package omq.common.util;
2
3import java.util.Properties;
4
5import omq.exception.EnvironmentException;
6
7
8/**
9 *
10 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
11 *
12 */
13public class Environment {
14        private static Properties env;
15
16        /**
17         * This method return the environment of the middleware
18         *
19         * @return Environment to use in the middleware
20         * @throws EnvironmentException
21         *             will be thrown whether the environment is null
22         */
23        public static Properties getEnvironment() throws EnvironmentException {
24                if (env == null) {
25                        throw new EnvironmentException();
26                }
27                return env;
28        }
29
30        /**
31         * This method sets the environment of the middleware
32         *
33         * @param environment
34         */
35        public static void setEnvironment(Properties environment) {
36                env = environment;
37        }
38}
Note: See TracBrowser for help on using the repository browser.