Class RoleContextImpl
- java.lang.Object
-
- org.opendaylight.openflowplugin.impl.role.RoleContextImpl
-
- All Implemented Interfaces:
AutoCloseable
,org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
,RequestContextStack
,OFPContext
,RoleContext
,org.opendaylight.yangtools.concepts.Identifiable<org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier>
public class RoleContextImpl extends Object implements RoleContext
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
com.google.common.util.concurrent.ListenableFuture<Void>
closeServiceInstance()
<T> RequestContext<T>
createRequestContext()
Method returns new request context for current request.DeviceInfo
getDeviceInfo()
Get device info.@NonNull org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier
getIdentifier()
void
instantiateServiceInstance()
void
registerMastershipWatcher(@NonNull ContextChainMastershipWatcher newWatcher)
Registers mastership change listener to context.void
setRoleService(SalRoleService salRoleService)
Sets role service.
-
-
-
Method Detail
-
getDeviceInfo
public DeviceInfo getDeviceInfo()
Description copied from interface:OFPContext
Get device info.- Specified by:
getDeviceInfo
in interfaceOFPContext
- Returns:
- device info
-
setRoleService
public void setRoleService(SalRoleService salRoleService)
Description copied from interface:RoleContext
Sets role service.- Specified by:
setRoleService
in interfaceRoleContext
- Parameters:
salRoleService
- the sal role service
-
registerMastershipWatcher
public void registerMastershipWatcher(@NonNull ContextChainMastershipWatcher newWatcher)
Description copied from interface:OFPContext
Registers mastership change listener to context.- Specified by:
registerMastershipWatcher
in interfaceOFPContext
- Parameters:
newWatcher
- mastership change listener
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceOFPContext
-
instantiateServiceInstance
public void instantiateServiceInstance()
- Specified by:
instantiateServiceInstance
in interfaceorg.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
-
closeServiceInstance
public com.google.common.util.concurrent.ListenableFuture<Void> closeServiceInstance()
- Specified by:
closeServiceInstance
in interfaceorg.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
-
createRequestContext
public <T> RequestContext<T> createRequestContext()
Description copied from interface:RequestContextStack
Method returns new request context for current request.- Specified by:
createRequestContext
in interfaceRequestContextStack
- Returns:
- A request context, or null if one cannot be created.
-
getIdentifier
public @NonNull org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier getIdentifier()
- Specified by:
getIdentifier
in interfaceorg.opendaylight.yangtools.concepts.Identifiable<org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier>
-
-