305d7453c6644936e88c083e275a3cb4107f4a93
[ccsdk/features.git] /
1 package org.onap.ccsdk.features.sdnr.wt.websocketmanager.model;
2
3 import org.opendaylight.mdsal.dom.api.DOMNotification;
4 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
5 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
6 import org.opendaylight.yangtools.yang.binding.Notification;
7 import org.opendaylight.yangtools.yang.common.QName;
8
9 /*
10  * ============LICENSE_START=======================================================
11  * ONAP : ccsdk features
12  * ================================================================================
13  * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property.
14  * All rights reserved.
15  * ================================================================================
16  * Licensed under the Apache License, Version 2.0 (the "License");
17  * you may not use this file except in compliance with the License.
18  * You may obtain a copy of the License at
19  *
20  *     http://www.apache.org/licenses/LICENSE-2.0
21  *
22  * Unless required by applicable law or agreed to in writing, software
23  * distributed under the License is distributed on an "AS IS" BASIS,
24  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25  * See the License for the specific language governing permissions and
26  * limitations under the License.
27  * ============LICENSE_END=========================================================
28  *
29  */
30 /**
31  *
32  * outgoing message will be wrapped into container:
33  * <pre>
34  * {@code
35  * <notification>
36  *   <eventTime>2017-07-12T12:00:00.0Z</eventTime>
37  *   <problem-notification xmlns="urn:onf:params:xml:ns:yang:microwave-model">
38  *       <problem>signalIsLostMinor</problem>
39  *       <object-id-ref>LP-MWPS-RADIO</object-id-ref>
40  *       <severity>non-alarmed</severity>
41  *       <counter>$COUNTER</counter>
42  *       <time-stamp>$TIME</time-stamp>
43  *   </problem-notification>
44  *   <node-id>ROADM-A</node-id>
45  *   <eventType></eventType>
46  * </notification>
47  * }
48  * </pre>
49  * @author jack
50  *
51  */
52 public interface WebsocketManagerService {
53
54     /**
55      * Send notification via Websocket to the connected clients.
56      * eventTime is extracted out of notification if {@link #EventInstantAware } is implemented
57      * @param notification
58      * @param nodeId
59      * @param eventType
60      */
61     void sendNotification(Notification notification, NodeId nodeId, QName eventType);
62     /**
63      * Send notification via Websocket to the connected clients.
64      * @param notification
65      * @param nodeId
66      * @param eventType
67      * @param eventTime
68      */
69     void sendNotification(Notification notification, NodeId nodeId, QName eventType, DateAndTime eventTime);
70
71     /**
72      * Send notification via Websocket to the connected clients.
73      * @param notification
74      * @param nodeId
75      * @param eventType
76      */
77     void sendNotification(DOMNotification notification, NodeId nodeId, QName eventType);
78     /**
79      * Send notification via Websocket to the connected clients.
80      * @param notification
81      * @param nodeId
82      * @param eventType
83      * @param eventTime
84      */
85     void sendNotification(DOMNotification notification, NodeId nodeId, QName eventType, DateAndTime eventTime);
86
87
88
89 }