Class LLDPSpeaker
- java.lang.Object
-
- org.opendaylight.openflowplugin.applications.lldpspeaker.LLDPSpeaker
-
- All Implemented Interfaces:
AutoCloseable
,Runnable
,NodeConnectorEventsObserver
public class LLDPSpeaker extends Object implements NodeConnectorEventsObserver, Runnable, AutoCloseable
Objects of this class send LLDP frames over all flow-capable ports that can be discovered through inventory.
-
-
Constructor Summary
Constructors Constructor Description LLDPSpeaker(PacketProcessingService packetProcessingService, ScheduledExecutorService scheduledExecutorService, LldpSpeakerConfig lldpSpeakerConfig, DeviceOwnershipService deviceOwnershipStatusService)
LLDPSpeaker(PacketProcessingService packetProcessingService, LldpSpeakerConfig lldpSpeakerConfig, DeviceOwnershipService deviceOwnershipService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes this resource, relinquishing any underlying resources.long
getLldpFloodInterval()
OperStatus
getOperationalStatus()
void
nodeConnectorAdded(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector> nodeConnectorInstanceId, FlowCapableNodeConnector flowConnector)
This method is called when new node connector is added to inventory or when existing node connector changed it's status to UP.void
nodeConnectorRemoved(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector> nodeConnectorInstanceId)
This method is called when some node connector is removed from inventory or when existing node connector changed it's status to DOWN.void
run()
Send LLDPDU frames to all known openflow switch ports.void
setLldpFloodInterval(long time)
void
setOperationalStatus(OperStatus operationalStatus)
-
-
-
Constructor Detail
-
LLDPSpeaker
public LLDPSpeaker(PacketProcessingService packetProcessingService, LldpSpeakerConfig lldpSpeakerConfig, DeviceOwnershipService deviceOwnershipService)
-
LLDPSpeaker
public LLDPSpeaker(PacketProcessingService packetProcessingService, ScheduledExecutorService scheduledExecutorService, LldpSpeakerConfig lldpSpeakerConfig, DeviceOwnershipService deviceOwnershipStatusService)
-
-
Method Detail
-
setOperationalStatus
public void setOperationalStatus(OperStatus operationalStatus)
-
getOperationalStatus
public OperStatus getOperationalStatus()
-
setLldpFloodInterval
public void setLldpFloodInterval(long time)
-
getLldpFloodInterval
public long getLldpFloodInterval()
-
close
public void close()
Closes this resource, relinquishing any underlying resources.- Specified by:
close
in interfaceAutoCloseable
-
run
public void run()
Send LLDPDU frames to all known openflow switch ports.
-
nodeConnectorAdded
public void nodeConnectorAdded(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector> nodeConnectorInstanceId, FlowCapableNodeConnector flowConnector)
Description copied from interface:NodeConnectorEventsObserver
This method is called when new node connector is added to inventory or when existing node connector changed it's status to UP. This method can be called multiple times for the same creation event.- Specified by:
nodeConnectorAdded
in interfaceNodeConnectorEventsObserver
- Parameters:
nodeConnectorInstanceId
- Object that uniquely identify added node connectorflowConnector
- object containing almost all of details about node connector
-
nodeConnectorRemoved
public void nodeConnectorRemoved(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector> nodeConnectorInstanceId)
Description copied from interface:NodeConnectorEventsObserver
This method is called when some node connector is removed from inventory or when existing node connector changed it's status to DOWN. This method can be called multiple times for the same removal event.- Specified by:
nodeConnectorRemoved
in interfaceNodeConnectorEventsObserver
- Parameters:
nodeConnectorInstanceId
- Object that uniquely identify added node connector
-
-