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.
|
registerListener
addCloseable
public 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 AutoCloseable
close
in class CloseableContainer
public 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.PacketProcessingListener
notification
- A PACKET_IN notification.protected org.slf4j.Logger getLogger()
Note that this method will be called before the constructor returns.
getLogger
in class CloseableContainer
Logger
instance.public void notifyVtnNode(VtnNodeEvent ev)
notifyVtnNode
in interface VTNInventoryListener
ev
- A VtnNodeEvent
instance.public void notifyVtnPort(VtnPortEvent ev) throws VTNException
notifyVtnPort
in interface VTNInventoryListener
ev
- A VtnPortEvent
instance.VTNException
- An error occurred.Copyright © 2018 OpenDaylight. All rights reserved.