Class ConnectionManagerImpl
java.lang.Object
org.opendaylight.openflowplugin.impl.connection.ConnectionManagerImpl
- All Implemented Interfaces:
AutoCloseable
,SwitchConnectionHandler
,ConnectionManager
-
Constructor Summary
ConstructorDescriptionConnectionManagerImpl
(OpenflowProviderConfig config, ExecutorService executorService, org.opendaylight.mdsal.binding.api.DataBroker dataBroker, @NonNull org.opendaylight.mdsal.binding.api.NotificationPublishService notificationPublishService) -
Method Summary
Modifier and TypeMethodDescriptionboolean
accept
(InetAddress switchAddress) Invoked to determine if a switch connection should be accepted.void
close()
void
onSwitchConnected
(ConnectionAdapter connectionAdapter) Invoked when a switch connects.void
setDeviceConnectedHandler
(DeviceConnectedHandler deviceConnectedHandler) Method registers handler responsible handling operations related to connected device after device is connected.void
setDeviceDisconnectedHandler
(DeviceDisconnectedHandler deviceDisconnectedHandler) Method registers handler responsible handling device disconnected event.
-
Constructor Details
-
ConnectionManagerImpl
public ConnectionManagerImpl(OpenflowProviderConfig config, ExecutorService executorService, org.opendaylight.mdsal.binding.api.DataBroker dataBroker, @NonNull org.opendaylight.mdsal.binding.api.NotificationPublishService notificationPublishService)
-
-
Method Details
-
onSwitchConnected
Description copied from interface:SwitchConnectionHandler
Invoked when a switch connects.- Specified by:
onSwitchConnected
in interfaceSwitchConnectionHandler
- Parameters:
connectionAdapter
- to switch proving message sending/receiving, connection management
-
accept
Description copied from interface:SwitchConnectionHandler
Invoked to determine if a switch connection should be accepted.- Specified by:
accept
in interfaceSwitchConnectionHandler
- Parameters:
switchAddress
- address of incoming connection (address + port)- Returns:
- true, if connection from switch having given address shell be accepted; false otherwise
-
setDeviceConnectedHandler
Description copied from interface:ConnectionManager
Method registers handler responsible handling operations related to connected device after device is connected.- Specified by:
setDeviceConnectedHandler
in interfaceConnectionManager
- Parameters:
deviceConnectedHandler
- device connected handler
-
setDeviceDisconnectedHandler
Description copied from interface:ConnectionManager
Method registers handler responsible handling device disconnected event.- Specified by:
setDeviceDisconnectedHandler
in interfaceConnectionManager
- Parameters:
deviceDisconnectedHandler
- device disconnected handler
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-