2 * ============LICENSE_START=======================================================
3 * ONAP : ccsdk features
4 * ================================================================================
5 * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property.
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
22 package org.onap.ccsdk.features.sdnr.wt.devicemanager.service;
24 import com.fasterxml.jackson.core.JsonProcessingException;
25 import org.eclipse.jdt.annotation.NonNull;
26 import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESCommonEventHeaderPOJO;
27 import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESFaultFieldsPOJO;
28 import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESMessage;
29 import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESNotificationFieldsPOJO;
30 import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESPNFRegistrationFieldsPOJO;
33 * Interface used for publishing VES messages to the VES Collector
38 public interface VESCollectorService extends DeviceManagerService {
41 * Gets the VES Collector configuration from etc/devicemanager.properties configuration file
43 VESCollectorCfgService getConfig();
46 * publishes a VES message to the VES Collector by sending a REST request
50 boolean publishVESMessage(VESMessage vesMsg);
53 * clients interested in VES Collector configuration changes can call the registerForChanges method so as to be notified when configuration changes are made
55 void registerForChanges(VESCollectorConfigChangeListener o);
58 * de-registering clients as part of cleanup
61 void deregister(VESCollectorConfigChangeListener o);
64 * Get a parser to parse {@link #org.opendaylight.yangtools.yang.binding.Notification } messages
65 * @return NotificationProxyParser object
68 NotificationProxyParser getNotificationProxyParser();
71 * Generates VES Event JSON containing commonEventHeader and notificationFields fields
73 * @param commonEventHeader
75 * @return VESMessage - representing the VESEvent JSON
76 * @throws JsonProcessingException
78 VESMessage generateVESEvent(VESCommonEventHeaderPOJO commonEventHeader, VESNotificationFieldsPOJO notifFields) throws JsonProcessingException;
81 * Generates VES Event JSON containing commonEventHeader and faultFields fields
83 * @param commonEventHeader
85 * @return VESMessage - representing the VES Event JSON
86 * @throws JsonProcessingException
88 VESMessage generateVESEvent(VESCommonEventHeaderPOJO commonEventHeader, VESFaultFieldsPOJO faultFields) throws JsonProcessingException;
91 * Generates VES Event JSON containing commonEventHeader and pnfRegistration fields
93 * @param commonEventHeader
95 * @return VESMessage - representing the VES Event JSON
96 * @throws JsonProcessingException
98 VESMessage generateVESEvent(VESCommonEventHeaderPOJO commonEventHeader, VESPNFRegistrationFieldsPOJO faultFields) throws JsonProcessingException;