Class ConnectionManagerImpl
java.lang.Object
org.opendaylight.openflowplugin.impl.connection.ConnectionManagerImpl
- All Implemented Interfaces:
AutoCloseable,SwitchConnectionHandler,ConnectionManager
-
Constructor Summary
ConstructorsConstructorDescriptionConnectionManagerImpl(OpenflowProviderConfig config, ExecutorService executorService, org.opendaylight.mdsal.binding.api.DataBroker dataBroker, @NonNull org.opendaylight.mdsal.binding.api.NotificationPublishService notificationPublishService) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(InetAddress switchAddress) Invoked to determine if a switch connection should be accepted.voidclose()voidonSwitchConnected(ConnectionAdapter connectionAdapter) Invoked when a switch connects.voidsetDeviceConnectedHandler(DeviceConnectedHandler deviceConnectedHandler) Method registers handler responsible handling operations related to connected device after device is connected.voidsetDeviceDisconnectedHandler(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:SwitchConnectionHandlerInvoked when a switch connects.- Specified by:
onSwitchConnectedin interfaceSwitchConnectionHandler- Parameters:
connectionAdapter- to switch proving message sending/receiving, connection management
-
accept
Description copied from interface:SwitchConnectionHandlerInvoked to determine if a switch connection should be accepted.- Specified by:
acceptin 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:ConnectionManagerMethod registers handler responsible handling operations related to connected device after device is connected.- Specified by:
setDeviceConnectedHandlerin interfaceConnectionManager- Parameters:
deviceConnectedHandler- device connected handler
-
setDeviceDisconnectedHandler
Description copied from interface:ConnectionManagerMethod registers handler responsible handling device disconnected event.- Specified by:
setDeviceDisconnectedHandlerin interfaceConnectionManager- Parameters:
deviceDisconnectedHandler- device disconnected handler
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-