[ONOS-5485] Defining VirtualPacketProvider

Changes
1. Added VirtualPacketProvider interface

Change-Id: Id494e1e77b4991c87bf6cbc054f768596599265f
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/provider/VirtualPacketProvider.java b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/provider/VirtualPacketProvider.java
new file mode 100644
index 0000000..605f4e6
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/provider/VirtualPacketProvider.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.incubator.net.virtual.provider;
+
+import org.onosproject.incubator.net.virtual.NetworkId;
+import org.onosproject.net.packet.OutboundPacket;
+
+/**
+ * Abstraction of a virtual packet provider capable of emitting packets
+ * from virtual network core services to the underlay network.
+ * This provider de-virtualzes OutboundPacket, and virtualizes PacketContext.
+ */
+public interface VirtualPacketProvider extends VirtualProvider {
+
+    /**
+     * Emits the specified outbound packet onto the underlay physical network.
+     * This provider maps the requested packets for physical network.
+     *
+     * @param networkId the virtual network ID
+     * @param packet outbound packet in the context of virtual network
+     */
+    void emit(NetworkId networkId, OutboundPacket packet);
+
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/provider/VirtualPacketProviderService.java b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/provider/VirtualPacketProviderService.java
new file mode 100644
index 0000000..28272d6
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/provider/VirtualPacketProviderService.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.incubator.net.virtual.provider;
+
+import org.onosproject.incubator.net.virtual.NetworkId;
+import org.onosproject.net.packet.PacketContext;
+
+/**
+ * Entity capable of processing inbound packets for virtual networks.
+ */
+public interface VirtualPacketProviderService
+        extends VirtualProviderService<VirtualPacketProvider> {
+
+    /**
+     * Submits inbound packet context for processing to virtual network core.
+     * This processing will be done synchronously, i.e. run-to-completion.
+     * This context is translated with virtual concepts.
+     *
+     * @param networkId the virtual network ID which will handle the packet context
+     * @param context inbound packet context
+     */
+    void processPacket(NetworkId networkId, PacketContext context);
+
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/provider/package-info.java b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/provider/package-info.java
index 36cd14d..d9a74d2 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/provider/package-info.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/virtual/provider/package-info.java
@@ -15,6 +15,6 @@
  */
 
 /**
- * Network virtualization data models and services.
+ * Network virtualization provider interfaces and implementation.
  */
 package org.onosproject.incubator.net.virtual.provider;
\ No newline at end of file