Sanjana Agarwal | cb4a3db | 2016-07-14 11:42:48 -0700 | [diff] [blame] | 1 | /** |
| 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 | |
| 17 | package org.onosproject.kafkaintegration.api; |
| 18 | |
Yuta HIGUCHI | 9efba1e | 2016-07-09 11:07:13 -0700 | [diff] [blame^] | 19 | import com.google.protobuf.GeneratedMessageV3; |
| 20 | |
Sanjana Agarwal | cb4a3db | 2016-07-14 11:42:48 -0700 | [diff] [blame] | 21 | import org.onosproject.kafkaintegration.api.dto.OnosEvent.Type; |
| 22 | |
| 23 | /** |
| 24 | * API for dispatching ONOS events. |
| 25 | */ |
| 26 | public 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 HIGUCHI | 9efba1e | 2016-07-09 11:07:13 -0700 | [diff] [blame^] | 34 | // FIXME reconsider message type, something similar to "OnosEvent"? |
| 35 | void publish(Type eventType, GeneratedMessageV3 message); |
Sanjana Agarwal | cb4a3db | 2016-07-14 11:42:48 -0700 | [diff] [blame] | 36 | } |