blob: 052c1e642fcea9bd3b53fcad46a5d17544011f95 [file] [log] [blame]
Sanjana Agarwalcb4a3db2016-07-14 11:42:48 -07001/**
2 * Copyright 2016-present Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.kafkaintegration.api;
18
Yuta HIGUCHI9efba1e2016-07-09 11:07:13 -070019import com.google.protobuf.GeneratedMessageV3;
20
Sanjana Agarwalcb4a3db2016-07-14 11:42:48 -070021import org.onosproject.kafkaintegration.api.dto.OnosEvent.Type;
22
23/**
24 * API for dispatching ONOS events.
25 */
26public interface KafkaPublisherService {
27
28 /**
29 * Publish the ONOS Event to all listeners.
30 *
31 * @param eventType the ONOS eventtype
32 * @param message generated Protocol buffer message from ONOS event data
33 */
Yuta HIGUCHI9efba1e2016-07-09 11:07:13 -070034 // FIXME reconsider message type, something similar to "OnosEvent"?
35 void publish(Type eventType, GeneratedMessageV3 message);
Sanjana Agarwalcb4a3db2016-07-14 11:42:48 -070036}