Class ContextChainHolderImpl
java.lang.Object
org.opendaylight.openflowplugin.impl.lifecycle.ContextChainHolderImpl
- All Implemented Interfaces:
- AutoCloseable,- org.opendaylight.mdsal.eos.binding.api.EntityOwnershipListener,- DeviceConnectedHandler,- DeviceDisconnectedHandler,- DeviceRemovedHandler,- ContextChainHolder,- ContextChainMastershipWatcher,- MasterChecker
public final class ContextChainHolderImpl
extends Object
implements ContextChainHolder, MasterChecker
- 
Constructor SummaryConstructorsConstructorDescriptionContextChainHolderImpl(Executor executor, org.opendaylight.mdsal.singleton.api.ClusterSingletonServiceProvider singletonServiceProvider, org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService entityOwnershipService, OwnershipChangeListener ownershipChangeListener, OpenflowProviderConfig config) 
- 
Method SummaryModifier and TypeMethodDescription<T extends OFPManager>
 voidaddManager(T manager) Managers need to be added before.voidclose()deviceConnected(ConnectionContext connectionContext) Method is used to propagate information about established connection with device.getContextChain(DeviceInfo deviceInfo) Return theContextChainfor a givenDeviceInfo.booleanCheck if any device is mastered by controller.Mastered devices.voidonDeviceDisconnected(ConnectionContext connectionContext) Method is used to propagate information about closed connection with device.voidonDeviceRemoved(DeviceInfo deviceInfo) Method is used to propagate information about device being removed from manager.voidonMasterRoleAcquired(DeviceInfo deviceInfo, ContextChainMastershipState mastershipState) Changed to MASTER role on device.voidonNotAbleToStartMastership(DeviceInfo deviceInfo, String reason, boolean mandatory) Event occurs if there was a try to acquire MASTER role.voidonSlaveRoleAcquired(DeviceInfo deviceInfo) Change to SLAVE role on device was successful.voidonSlaveRoleNotAcquired(DeviceInfo deviceInfo, String reason) Change to SLAVE role on device was not able.voidownershipChanged(org.opendaylight.mdsal.eos.binding.api.Entity entity, org.opendaylight.mdsal.eos.common.api.EntityOwnershipStateChange change, boolean inJeopardy) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opendaylight.openflowplugin.api.openflow.lifecycle.ContextChainMastershipWatcheronNotAbleToStartMastershipMandatory
- 
Constructor Details- 
ContextChainHolderImplpublic ContextChainHolderImpl(Executor executor, org.opendaylight.mdsal.singleton.api.ClusterSingletonServiceProvider singletonServiceProvider, org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService entityOwnershipService, OwnershipChangeListener ownershipChangeListener, OpenflowProviderConfig config) 
 
- 
- 
Method Details- 
addManagerDescription copied from interface:ContextChainHolder- Specified by:
- addManagerin interface- ContextChainHolder
- Type Parameters:
- T-- OFPManager
- Parameters:
- manager- a child class of- OFPManager
 
- 
deviceConnectedDescription copied from interface:DeviceConnectedHandlerMethod is used to propagate information about established connection with device. It propagates connected device's connection context.- Specified by:
- deviceConnectedin interface- DeviceConnectedHandler
 
- 
onNotAbleToStartMastershipDescription copied from interface:ContextChainMastershipWatcherEvent occurs if there was a try to acquire MASTER role. But it was not possible to start this MASTER role on device.- Specified by:
- onNotAbleToStartMastershipin interface- ContextChainMastershipWatcher
- Parameters:
- deviceInfo- connected switch identification
- reason- reason
- mandatory- if it is mandatory connection will be dropped
 
- 
onMasterRoleAcquiredpublic void onMasterRoleAcquired(DeviceInfo deviceInfo, ContextChainMastershipState mastershipState) Description copied from interface:ContextChainMastershipWatcherChanged to MASTER role on device.- Specified by:
- onMasterRoleAcquiredin interface- ContextChainMastershipWatcher
- Parameters:
- deviceInfo- connected switch identification
- mastershipState- state
 
- 
onSlaveRoleAcquiredDescription copied from interface:ContextChainMastershipWatcherChange to SLAVE role on device was successful.- Specified by:
- onSlaveRoleAcquiredin interface- ContextChainMastershipWatcher
- Parameters:
- deviceInfo- connected switch identification
 
- 
onSlaveRoleNotAcquiredDescription copied from interface:ContextChainMastershipWatcherChange to SLAVE role on device was not able.- Specified by:
- onSlaveRoleNotAcquiredin interface- ContextChainMastershipWatcher
- Parameters:
- deviceInfo- connected switch identification
- reason- reason
 
- 
onDeviceDisconnectedDescription copied from interface:DeviceDisconnectedHandlerMethod is used to propagate information about closed connection with device. It propagates connected device's connection context.- Specified by:
- onDeviceDisconnectedin interface- DeviceDisconnectedHandler
 
- 
getContextChainDescription copied from interface:ContextChainHolderReturn theContextChainfor a givenDeviceInfo.- Specified by:
- getContextChainin interface- ContextChainHolder
- Returns:
- ContextChain
 
- 
closepublic void close()- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- ContextChainHolder
 
- 
ownershipChangedpublic void ownershipChanged(org.opendaylight.mdsal.eos.binding.api.Entity entity, org.opendaylight.mdsal.eos.common.api.EntityOwnershipStateChange change, boolean inJeopardy) - Specified by:
- ownershipChangedin interface- org.opendaylight.mdsal.eos.binding.api.EntityOwnershipListener
 
- 
listOfMasteredDevicesDescription copied from interface:MasterCheckerMastered devices.- Specified by:
- listOfMasteredDevicesin interface- MasterChecker
- Returns:
- list of mastered devices
 
- 
isAnyDeviceMasteredpublic boolean isAnyDeviceMastered()Description copied from interface:MasterCheckerCheck if any device is mastered by controller.- Specified by:
- isAnyDeviceMasteredin interface- MasterChecker
- Returns:
- true if there is at least one device mastered by controller
 
- 
onDeviceRemovedDescription copied from interface:DeviceRemovedHandlerMethod is used to propagate information about device being removed from manager.- Specified by:
- onDeviceRemovedin interface- DeviceRemovedHandler
 
 
-