Class ConnectionManagerImpl
- java.lang.Object
 - 
- org.opendaylight.openflowplugin.impl.connection.ConnectionManagerImpl
 
 
- 
- All Implemented Interfaces:
 AutoCloseable,SwitchConnectionHandler,ConnectionManager
public class ConnectionManagerImpl extends Object implements ConnectionManager
 
- 
- 
Constructor Summary
Constructors Constructor Description ConnectionManagerImpl(OpenflowProviderConfig config, ExecutorService executorService, org.opendaylight.mdsal.binding.api.DataBroker dataBroker, @NonNull org.opendaylight.mdsal.binding.api.NotificationPublishService notificationPublishService) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(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 Detail
- 
ConnectionManagerImpl
public ConnectionManagerImpl(OpenflowProviderConfig config, ExecutorService executorService, org.opendaylight.mdsal.binding.api.DataBroker dataBroker, @NonNull org.opendaylight.mdsal.binding.api.NotificationPublishService notificationPublishService)
 
 - 
 
- 
Method Detail
- 
onSwitchConnected
public void onSwitchConnected(ConnectionAdapter connectionAdapter)
Description copied from interface:SwitchConnectionHandlerInvoked when a switch connects.- Specified by:
 onSwitchConnectedin interfaceSwitchConnectionHandler- Parameters:
 connectionAdapter- to switch proving message sending/receiving, connection management
 
- 
accept
public boolean accept(InetAddress switchAddress)
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
public void setDeviceConnectedHandler(DeviceConnectedHandler deviceConnectedHandler)
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
public void setDeviceDisconnectedHandler(DeviceDisconnectedHandler deviceDisconnectedHandler)
Description copied from interface:ConnectionManagerMethod registers handler responsible handling device disconnected event.- Specified by:
 setDeviceDisconnectedHandlerin interfaceConnectionManager- Parameters:
 deviceDisconnectedHandler- device disconnected handler
 
- 
close
public void close() throws Exception- Specified by:
 closein interfaceAutoCloseable- Throws:
 Exception
 
 - 
 
 -