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