6d7c6ff7eb7f26c31de17f174cae1f915d1f1a6a
[policy/apex-pdp.git] / services / services-engine / src / test / java / org / onap / policy / apex / service / engine / parameters / dummyclasses / SuperDooperDistributorParameters.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  * 
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  * 
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  * 
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.apex.service.engine.parameters.dummyclasses;
22
23 import org.onap.policy.apex.context.parameters.DistributorParameters;
24 import org.onap.policy.apex.model.basicmodel.service.ParameterService;
25
26 /**
27  * Distributor parameters for the Super Dooper Distributor
28  * 
29  * @author Liam Fallon (liam.fallon@ericsson.com)
30  * @version
31  */
32 public class SuperDooperDistributorParameters extends DistributorParameters {
33     // Constants for SuperDooper configuration file locations
34     public static final String DEFAULT_SUPER_DOOPER_DISTRIBUTION_CONFIG_FILE = "superDooper/superDooper.xml";
35     public static final String DEFAULT_SUPER_DOOPER_DISTRIBUTION_JGROUPS_FILE =
36             "superDooper/jgroups-superDooper-apex.xml";
37     public static final boolean DEFAULT_SUPER_DOOPER_JAVA_NET_PREFER_IPV4_STACK = true;
38     public static final String DEFAULT_INFINSPAN_JGROUPS_BIND_ADDRESS = "localhost";
39
40     // SuperDooper configuration file names
41     private String configFile = DEFAULT_SUPER_DOOPER_DISTRIBUTION_CONFIG_FILE;
42     private String jgroupsFile = DEFAULT_SUPER_DOOPER_DISTRIBUTION_JGROUPS_FILE;
43     private boolean preferIPv4Stack = DEFAULT_SUPER_DOOPER_JAVA_NET_PREFER_IPV4_STACK;
44     private String jGroupsBindAddress = DEFAULT_INFINSPAN_JGROUPS_BIND_ADDRESS;
45
46     public SuperDooperDistributorParameters() {
47         super(SuperDooperDistributorParameters.class.getCanonicalName());
48         ParameterService.registerParameters(SuperDooperDistributorParameters.class, this);
49         ParameterService.registerParameters(DistributorParameters.class, this);
50     }
51
52     public String getConfigFile() {
53         return configFile;
54     }
55
56     public void setConfigFile(final String configFile) {
57         this.configFile = configFile;
58     }
59
60     public String getJgroupsFile() {
61         return jgroupsFile;
62     }
63
64     public void setJgroupsFile(final String jgroupsFile) {
65         this.jgroupsFile = jgroupsFile;
66     }
67
68     public boolean preferIPv4Stack() {
69         return preferIPv4Stack;
70     }
71
72     public void setPreferIPv4Stack(final boolean preferIPv4Stack) {
73         this.preferIPv4Stack = preferIPv4Stack;
74     }
75
76     public String getjGroupsBindAddress() {
77         return jGroupsBindAddress;
78     }
79
80     public void setjGroupsBindAddress(final String jGroupsBindAddress) {
81         this.jGroupsBindAddress = jGroupsBindAddress;
82     }
83
84     @Override
85     public String toString() {
86         return "SuperDooperDistributorParameters [configFile=" + configFile + ", jgroupsFile=" + jgroupsFile
87                 + ", preferIPv4Stack=" + preferIPv4Stack + ", jGroupsBindAddress=" + jGroupsBindAddress + "]";
88     }
89 }