Interface DeviceContext
- 
- All Superinterfaces:
- AutoCloseable,- org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService,- ContextChainStateListener,- DeviceInitializationContext,- DeviceRegistry,- DeviceReplyProcessor,- org.opendaylight.yangtools.concepts.Identifiable<org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier>,- OFPContext,- RequestContextStack,- TxFacade
 - All Known Implementing Classes:
- DeviceContextImpl
 
 public interface DeviceContext extends OFPContext, DeviceReplyProcessor, TxFacade, DeviceRegistry, RequestContextStack, ContextChainStateListener, DeviceInitializationContext The central entity of OFP is the Device Context, which encapsulate the logical state of a switch as seen by the controller. Each OpenFlow session is tracked by a Connection Context. These attach to a particular Device Context in such a way, that there is at most one primary session associated with a Device Context. Whenever the controller needs to interact with a particular switch, it will do so in the context of the calling thread, obtaining a lock on the corresponding Device Context – thus the Device Context becomes the fine-grained point of synchronization. The only two entities allowed to send requests towards the switch are Statistics Manager and RPC Manager. Each of them allocates a Request Context for interacting with a particular Device Context. The Request Contexts are the basic units of fairness, which is enforced by keeping a cap on the number of outstanding requests a particular Request Context can have at any point in time. Should this quota be exceeded, any further attempt to make a request to the switch will fail immediately, with proper error indication.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanUseSingleLayerSerialization()Checks if device and controller supports single layer serialization.DeviceStategetDeviceState()Method provides state of device represented by this device context.MessageSpygetMessageSpy()Gets message spy.<T extends OfHeader>
 MultiMsgCollector<T>getMultiMsgCollector(RequestContext<List<T>> requestContext)Gets multi msg collector.ConnectionContextgetPrimaryConnectionContext()Getter.booleaninitialSubmitTransaction()Method for initial submit transaction after successful initial gathering.booleanisStatisticsPollingOn()Checks if the statistics polling property is enabled.voidonPublished()Indicates that device context is fully published (e.g.: packetIn messages should be passed).TranslatorLibraryoook()Getter.voidsetNotificationPublishService(org.opendaylight.mdsal.binding.api.NotificationPublishService notificationPublishService)Sets notification publish service.voidupdatePacketInRateLimit(long upperBound)change packetIn rate limiter borders.- 
Methods inherited from interface org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServicecloseServiceInstance, instantiateServiceInstance
 - 
Methods inherited from interface org.opendaylight.openflowplugin.api.openflow.lifecycle.ContextChainStateListeneronStateAcquired
 - 
Methods inherited from interface org.opendaylight.openflowplugin.api.openflow.lifecycle.DeviceInitializationContextinitializeDevice
 - 
Methods inherited from interface org.opendaylight.openflowplugin.api.openflow.device.DeviceRegistrygetDeviceFlowRegistry, getDeviceGroupRegistry, getDeviceMeterRegistry
 - 
Methods inherited from interface org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceReplyProcessorprocessAlienMessage, processExperimenterMessage, processFlowRemovedMessage, processPacketInMessage, processPortStatusMessage, processReply, processReply
 - 
Methods inherited from interface org.opendaylight.openflowplugin.api.openflow.OFPContextclose, getDeviceInfo, registerMastershipWatcher
 - 
Methods inherited from interface org.opendaylight.openflowplugin.api.openflow.device.RequestContextStackcreateRequestContext
 - 
Methods inherited from interface org.opendaylight.openflowplugin.api.openflow.device.TxFacadeacquireWriteTransactionLock, addDeleteToTxChain, getReadTransaction, isTransactionsEnabled, releaseWriteTransactionLock, submitTransaction, syncSubmitTransaction, writeToTransaction, writeToTransactionWithParentsSlow
 
- 
 
- 
- 
- 
Method Detail- 
getDeviceStateDeviceState getDeviceState() Method provides state of device represented by this device context.- Returns:
- DeviceState
 
 - 
getPrimaryConnectionContextConnectionContext getPrimaryConnectionContext() Getter.- Returns:
- current devices connection context
 
 - 
oookTranslatorLibrary oook() Getter.- Returns:
- translator library
 
 - 
setNotificationPublishServicevoid setNotificationPublishService(org.opendaylight.mdsal.binding.api.NotificationPublishService notificationPublishService) Sets notification publish service.- Parameters:
- notificationPublishService- the notification publish service
 
 - 
getMessageSpyMessageSpy getMessageSpy() Gets message spy.- Returns:
- the message spy
 
 - 
getMultiMsgCollector<T extends OfHeader> MultiMsgCollector<T> getMultiMsgCollector(RequestContext<List<T>> requestContext) Gets multi msg collector.- Type Parameters:
- T- the type parameter
- Parameters:
- requestContext- the request context
- Returns:
- the multi msg collector
 
 - 
onPublishedvoid onPublished() Indicates that device context is fully published (e.g.: packetIn messages should be passed).
 - 
updatePacketInRateLimitvoid updatePacketInRateLimit(long upperBound) change packetIn rate limiter borders.- Parameters:
- upperBound- max amount of outstanding packetIns
 
 - 
canUseSingleLayerSerializationboolean canUseSingleLayerSerialization() Checks if device and controller supports single layer serialization.- Returns:
- true if single layer serialization is supported
 
 - 
initialSubmitTransactionboolean initialSubmitTransaction() Method for initial submit transaction after successful initial gathering.
 - 
isStatisticsPollingOnboolean isStatisticsPollingOn() Checks if the statistics polling property is enabled.- Returns:
- true if statistics polling is enabled.
 
 
- 
 
-