Class ConnectionContextImpl
java.lang.Object
org.opendaylight.openflowplugin.impl.connection.ConnectionContextImpl
- All Implemented Interfaces:
- ConnectionContext
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContextConnectionContext.CONNECTION_STATE
- 
Constructor SummaryConstructorsConstructorDescriptionConnectionContextImpl(ConnectionAdapter connectionAdapter, DeviceConnectionStatusProvider deviceConnectionStatusProvider) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionvoidchange internal state toConnectionContext.CONNECTION_STATE.HANDSHAKING.voidchange internal state toConnectionContext.CONNECTION_STATE.TIMEOUTING.voidchange internal state toConnectionContext.CONNECTION_STATE.WORKING.voidcloseConnection(boolean propagate) actively drop associated connection.booleanReturns connection adapter.Method returns current connection state.Create and return basic device info.Getter.Method returns identifier of device whic connection represents this context.Returns reference to OFJava outbound queue provider.Get safe nodeId for logging.voidhandlePortStatusMessage(PortStatusMessage portStatusMessage) Handle received port status message.voidThis method creates a basic device information.inthashCode()voidcleanup context upon connection closed event (by device).voidsetDeviceDisconnectedHandler(DeviceDisconnectedHandler deviceDisconnectedHandler) Method sets handler for handling closing connections.voidsetFeatures(FeaturesReply newFeaturesReply) Setter.voidsetHandshakeContext(HandshakeContext handshakeContext) Setter.voidSetter for nodeId.voidsetOutboundQueueHandleRegistration(OutboundQueueHandlerRegistration<OutboundQueueProvider> newRegistration) voidsetOutboundQueueProvider(OutboundQueueProvider outboundQueueProvider) Method sets reference to OFJava outbound queue provider.
- 
Constructor Details- 
ConnectionContextImplpublic ConnectionContextImpl(ConnectionAdapter connectionAdapter, DeviceConnectionStatusProvider deviceConnectionStatusProvider) Constructor.- Parameters:
- connectionAdapter- - connection adapter
 
 
- 
- 
Method Details- 
getConnectionAdapterDescription copied from interface:ConnectionContextReturns connection adapter.- Specified by:
- getConnectionAdapterin interface- ConnectionContext
- Returns:
- the connectionAdapter
 
- 
getOutboundQueueProviderDescription copied from interface:ConnectionContextReturns reference to OFJava outbound queue provider. Outbound queue is used for outbound messages processing.- Specified by:
- getOutboundQueueProviderin interface- ConnectionContext
- Returns:
- OutboundQueueProvider
 
- 
setOutboundQueueProviderDescription copied from interface:ConnectionContextMethod sets reference to OFJava outbound queue provider.- Specified by:
- setOutboundQueueProviderin interface- ConnectionContext
- Parameters:
- outboundQueueProvider-- OutboundQueueProvider
 
- 
getConnectionStateDescription copied from interface:ConnectionContextMethod returns current connection state.- Specified by:
- getConnectionStatein interface- ConnectionContext
- Returns:
- ConnectionContext.CONNECTION_STATE
 
- 
getNodeIdDescription copied from interface:ConnectionContextMethod returns identifier of device whic connection represents this context.- Specified by:
- getNodeIdin interface- ConnectionContext
- Returns:
- NodeId
 
- 
setNodeIdDescription copied from interface:ConnectionContextSetter for nodeId.- Specified by:
- setNodeIdin interface- ConnectionContext
- Parameters:
- nodeId- node id
 
- 
getFeaturesDescription copied from interface:ConnectionContextGetter.- Specified by:
- getFeaturesin interface- ConnectionContext
- Returns:
- featureReply as received from device during handshake
 
- 
setDeviceDisconnectedHandlerDescription copied from interface:ConnectionContextMethod sets handler for handling closing connections.- Specified by:
- setDeviceDisconnectedHandlerin interface- ConnectionContext
- Parameters:
- deviceDisconnectedHandler- handler for disconnect
 
- 
setFeaturesDescription copied from interface:ConnectionContextSetter.- Specified by:
- setFeaturesin interface- ConnectionContext
- Parameters:
- newFeaturesReply- as received from device during handshake
 
- 
closeConnectionpublic void closeConnection(boolean propagate) Description copied from interface:ConnectionContextactively drop associated connection.- Specified by:
- closeConnectionin interface- ConnectionContext
- Parameters:
- propagate- true if event need to be propagated to higher contexts (device, stats, rpc..) or false if invoked from higher context
- See Also:
 
- 
onConnectionClosedpublic void onConnectionClosed()Description copied from interface:ConnectionContextcleanup context upon connection closed event (by device).- Specified by:
- onConnectionClosedin interface- ConnectionContext
 
- 
getSafeNodeIdForLOGGet safe nodeId for logging.- Specified by:
- getSafeNodeIdForLOGin interface- ConnectionContext
- Returns:
- string value od nodeId or string "null"
 
- 
setOutboundQueueHandleRegistrationpublic void setOutboundQueueHandleRegistration(OutboundQueueHandlerRegistration<OutboundQueueProvider> newRegistration) - Specified by:
- setOutboundQueueHandleRegistrationin interface- ConnectionContext
 
- 
changeStateToHandshakingpublic void changeStateToHandshaking()Description copied from interface:ConnectionContextchange internal state toConnectionContext.CONNECTION_STATE.HANDSHAKING.- Specified by:
- changeStateToHandshakingin interface- ConnectionContext
 
- 
changeStateToTimeoutingpublic void changeStateToTimeouting()Description copied from interface:ConnectionContextchange internal state toConnectionContext.CONNECTION_STATE.TIMEOUTING.- Specified by:
- changeStateToTimeoutingin interface- ConnectionContext
 
- 
changeStateToWorkingpublic void changeStateToWorking()Description copied from interface:ConnectionContextchange internal state toConnectionContext.CONNECTION_STATE.WORKING.- Specified by:
- changeStateToWorkingin interface- ConnectionContext
 
- 
handlePortStatusMessageDescription copied from interface:ConnectionContextHandle received port status message.- Specified by:
- handlePortStatusMessagein interface- ConnectionContext
- Parameters:
- portStatusMessage- port status message
 
- 
retrieveAndClearPortStatusMessages- Specified by:
- retrieveAndClearPortStatusMessagesin interface- ConnectionContext
 
- 
getDeviceInfoDescription copied from interface:ConnectionContextCreate and return basic device info.- Specified by:
- getDeviceInfoin interface- ConnectionContext
- Returns:
- created device info
 
- 
handshakeSuccessfulpublic void handshakeSuccessful()Description copied from interface:ConnectionContextThis method creates a basic device information. Should be called after nodeId and features are set in connection context.- Specified by:
- handshakeSuccessfulin interface- ConnectionContext
 
- 
setHandshakeContextDescription copied from interface:ConnectionContextSetter.- Specified by:
- setHandshakeContextin interface- ConnectionContext
- Parameters:
- handshakeContext- corresponding handshake context used upon this connection
 
- 
equals
- 
hashCodepublic int hashCode()
 
-