2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
6 * Modifications copyright (c) 2018 Nokia
7 * Modifications Copyright (C) 2019 Nordix Foundation.
8 * ================================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 * ============LICENSE_END=========================================================
23 package org.onap.policy.controlloop.actor.appclcm;
25 import org.onap.policy.controlloop.actor.appc.AppcOperation;
26 import org.onap.policy.controlloop.actor.appc.ModifyConfigOperation;
27 import org.onap.policy.controlloop.actorserviceprovider.impl.BidirectionalTopicActor;
28 import org.onap.policy.controlloop.actorserviceprovider.impl.BidirectionalTopicOperator;
29 import org.onap.policy.controlloop.actorserviceprovider.parameters.BidirectionalTopicActorParams;
31 public class AppcLcmActor extends BidirectionalTopicActor<BidirectionalTopicActorParams> {
34 * Confirmed by Daniel, should be 'APPC'.
35 * The actor name defined in the yaml for both legacy operations and lcm operations is still “APPC”. Perhaps in a
36 * future review it would be better to distinguish them as two separate actors in the yaml but it should be okay for
39 public static final String NAME = "APPC";
42 * Constructs the object.
44 public AppcLcmActor() {
45 super(NAME, BidirectionalTopicActorParams.class);
47 // add LCM operations first as they take precedence
48 for (String opname : AppcLcmConstants.OPERATION_NAMES) {
49 addOperator(new BidirectionalTopicOperator(NAME, opname, this, AppcLcmOperation.SELECTOR_KEYS,
50 AppcLcmOperation::new));
53 // add legacy operations
54 addOperator(new BidirectionalTopicOperator(NAME, ModifyConfigOperation.NAME, this, AppcOperation.SELECTOR_KEYS,
55 ModifyConfigOperation::new));
59 * This actor should take precedence.
62 public int getSequenceNumber() {