blob: 30f3910b02eda9763402d9d7c78390b4cd76aec6 [file] [log] [blame]
Jonathan Hart4f60f982014-10-27 08:11:17 -07001/*
2 * Copyright 2014 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 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.store.trivial.impl;
Jonathan Hart4f60f982014-10-27 08:11:17 -070017
18import org.apache.felix.scr.annotations.Component;
19import org.apache.felix.scr.annotations.Service;
Brian O'Connorabafb502014-12-02 22:26:20 -080020import org.onosproject.net.packet.OutboundPacket;
21import org.onosproject.net.packet.PacketEvent;
22import org.onosproject.net.packet.PacketEvent.Type;
23import org.onosproject.net.packet.PacketStore;
24import org.onosproject.net.packet.PacketStoreDelegate;
25import org.onosproject.store.AbstractStore;
Jonathan Hart4f60f982014-10-27 08:11:17 -070026
27/**
28 * Simple single instance implementation of the packet store.
29 */
30@Component(immediate = true)
31@Service
32public class SimplePacketStore
33 extends AbstractStore<PacketEvent, PacketStoreDelegate>
34 implements PacketStore {
35
36 @Override
37 public void emit(OutboundPacket packet) {
38 notifyDelegate(new PacketEvent(Type.EMIT, packet));
39 }
40
41}