2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2016-2018 Ericsson. All rights reserved.
4 * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
5 * ================================================================================
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 * SPDX-License-Identifier: Apache-2.0
19 * ============LICENSE_END=========================================================
22 package org.onap.policy.apex.context.parameters;
24 import org.onap.policy.apex.context.impl.distribution.jvmlocal.JvmLocalDistributor;
25 import org.onap.policy.common.parameters.ParameterGroupImpl;
26 import org.onap.policy.common.parameters.annotations.ClassName;
27 import org.onap.policy.common.parameters.annotations.NotNull;
30 * An empty distributor parameter class that may be specialized by context distributor plugins that
31 * require plugin specific parameters. The class defines the default distributor plugin as the JVM
34 * @author Liam Fallon (liam.fallon@ericsson.com)
37 public class DistributorParameters extends ParameterGroupImpl {
38 /** The default distributor makes context albums available to all threads in a single JVM. */
39 public static final String DEFAULT_DISTRIBUTOR_PLUGIN_CLASS = JvmLocalDistributor.class.getName();
41 private @ClassName String pluginClass = DEFAULT_DISTRIBUTOR_PLUGIN_CLASS;
44 * Constructor to create a distributor parameters instance and register the instance with the
47 public DistributorParameters() {
48 super(ContextParameterConstants.DISTRIBUTOR_GROUP_NAME);
52 * Gets the plugin class.
54 * @return the plugin class
56 public String getPluginClass() {
61 * Sets the plugin class.
63 * @param pluginClass the plugin class
65 public void setPluginClass(final String pluginClass) {
66 this.pluginClass = pluginClass;
70 public String toString() {
71 return "DistributorParameters [name=" + getName() + ", pluginClass=" + pluginClass + "]";