public final class VTNPacketService extends SalNotificationListener implements org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingListener, VTNInventoryListener
| Constructor and Description |
|---|
VTNPacketService(VTNManagerProvider provider,
org.opendaylight.controller.md.sal.binding.api.NotificationService nsv)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(VTNPacketListener l)
Add the given VTN packet listener.
|
void |
close()
Close the internal packet service.
|
protected org.slf4j.Logger |
getLogger()
Return a logger instance.
|
void |
notifyVtnNode(VtnNodeEvent ev)
Invoked when a node information has been added or removed.
|
void |
notifyVtnPort(VtnPortEvent ev)
Invoked when a port information has been added, removed, or changed.
|
void |
onPacketReceived(org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketReceived notification)
Invoked when a PACKET_IN message has been notified.
|
void |
transmit(List<org.apache.commons.lang3.tuple.Pair<SalPort,Packet>> packets)
Transmit all the given packets.
|
void |
transmit(SalPort egress,
Packet packet)
Transmit the given packet.
|
registerListeneraddCloseablepublic VTNPacketService(VTNManagerProvider provider, org.opendaylight.controller.md.sal.binding.api.NotificationService nsv)
provider - A VTN Manager provider service.nsv - A NotificationService service instance.public void addListener(VTNPacketListener l)
l - A VTN packet listener.public void transmit(List<org.apache.commons.lang3.tuple.Pair<SalPort,Packet>> packets)
packets - A list of packets to transmit.
The left of each elements indicates the egress switch
port, and the right indiciates a packet to transmit.public void close()
close in interface AutoCloseableclose in class CloseableContainerpublic void onPacketReceived(org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketReceived notification)
onPacketReceived in interface org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingListenernotification - A PACKET_IN notification.protected org.slf4j.Logger getLogger()
Note that this method will be called before the constructor returns.
getLogger in class CloseableContainerLogger instance.public void notifyVtnNode(VtnNodeEvent ev)
notifyVtnNode in interface VTNInventoryListenerev - A VtnNodeEvent instance.public void notifyVtnPort(VtnPortEvent ev) throws VTNException
notifyVtnPort in interface VTNInventoryListenerev - A VtnPortEvent instance.VTNException - An error occurred.Copyright © 2018 OpenDaylight. All rights reserved.