2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.netconf.sal.streams.listeners;
10 import io.netty.channel.Channel;
13 * Represents event of specific {@link EventType} type, holds data and
14 * {@link Channel} subscriber.
17 private final EventType type;
18 private Channel subscriber;
22 * Creates new event specified by {@link EventType} type.
27 Event(final EventType type) {
32 * Gets the {@link Channel} subscriber.
36 public Channel getSubscriber() {
37 return this.subscriber;
41 * Sets subscriber for event.
46 public void setSubscriber(final Channel subscriber) {
47 this.subscriber = subscriber;
53 * @return String representation of event data.
55 public String getData() {
65 public void setData(final String data) {
72 * @return The type of the event.
74 public EventType getType() {