69a8b2795a5ef3c92927414ec5c9531799e7ee7e
[controller.git] / opendaylight / md-sal / messagebus-util / src / main / java / org / opendaylight / controller / messagebus / app / util / TopicDOMNotification.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.messagebus.app.util;
9
10 import org.opendaylight.mdsal.dom.api.DOMNotification;
11 import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventaggregator.rev141202.TopicNotification;
12 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
13 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
14
15 public class TopicDOMNotification implements DOMNotification {
16
17     private static final SchemaPath TOPIC_NOTIFICATION_ID = SchemaPath.create(true, TopicNotification.QNAME);
18     private final ContainerNode body;
19
20     public TopicDOMNotification(final ContainerNode body) {
21         this.body = body;
22     }
23
24     @Override
25     public SchemaPath getType() {
26         return TOPIC_NOTIFICATION_ID;
27     }
28
29     @Override
30     public ContainerNode getBody() {
31         return body;
32     }
33
34     @Override
35     public String toString() {
36         return "TopicDOMNotification [body=" + body + "]";
37     }
38 }