blob: d4cae92449d0a828833e223e2abd4a14e3bf1c5b [file] [log] [blame]
Dimitrios Mavrommatisf0c06322017-10-31 23:49:04 -07001/*
2 * Copyright 2017-present Open Networking Foundation
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 */
16package org.onosproject.artemis;
17
18import io.netty.channel.ChannelHandlerContext;
19import org.json.JSONObject;
20import org.onosproject.artemis.impl.objects.ArtemisMessage;
21
22/**
23 * Packet processor for artemis messages.
24 */
25public interface ArtemisPacketProcessor {
26
27 /**
28 * Process a packet received from a MOAS client/server.
29 *
30 * @param msg artemis message
31 * @param ctx channel context
32 */
33 void processMoasPacket(ArtemisMessage msg, ChannelHandlerContext ctx);
34
35 /**
36 * Process a BGP Update packet received from a monitor.
37 *
38 * @param msg BGP Update message
39 */
40 void processMonitorPacket(JSONObject msg);
41}