public interface ConnectionContext
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.
Modifier and Type | Interface and Description |
---|---|
static class |
ConnectionContext.CONNECTION_STATE
Distinguished connection states.
|
Modifier and Type | Method and Description |
---|---|
void |
changeStateToHandshaking()
change internal state to
ConnectionContext.CONNECTION_STATE.HANDSHAKING . |
void |
changeStateToTimeouting()
change internal state to
ConnectionContext.CONNECTION_STATE.TIMEOUTING . |
void |
changeStateToWorking()
change internal state to
ConnectionContext.CONNECTION_STATE.WORKING . |
void |
closeConnection(boolean propagate)
actively drop associated connection.
|
ConnectionAdapter |
getConnectionAdapter()
Returns connection adapter.
|
ConnectionContext.CONNECTION_STATE |
getConnectionState()
Method returns current connection state.
|
DeviceInfo |
getDeviceInfo()
Create and return basic device info.
|
FeaturesReply |
getFeatures()
Getter.
|
org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId |
getNodeId()
Method returns identifier of device whic connection represents this context.
|
OutboundQueue |
getOutboundQueueProvider()
Returns reference to OFJava outbound queue provider.
|
String |
getSafeNodeIdForLOG() |
void |
handlePortStatusMessage(PortStatusMessage portStatusMessage)
Handle received port status message.
|
void |
handshakeSuccessful()
This method creates a basic device information.
|
void |
onConnectionClosed()
cleanup context upon connection closed event (by device).
|
List<PortStatusMessage> |
retrieveAndClearPortStatusMessages() |
void |
setDeviceDisconnectedHandler(DeviceDisconnectedHandler deviceDisconnectedHandler)
Method sets handler for handling closing connections.
|
void |
setFeatures(FeaturesReply featuresReply)
Setter.
|
void |
setHandshakeContext(HandshakeContext handshakeContext)
Setter.
|
void |
setNodeId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId nodeId)
Setter for nodeId.
|
void |
setOutboundQueueHandleRegistration(OutboundQueueHandlerRegistration<OutboundQueueProvider> outboundQueueHandlerRegistration) |
void |
setOutboundQueueProvider(OutboundQueueProvider outboundQueueProvider)
Method sets reference to OFJava outbound queue provider.
|
void setHandshakeContext(HandshakeContext handshakeContext)
handshakeContext
- corresponding handshake context used upon this connectionvoid setNodeId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId nodeId)
nodeId
- node idorg.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId getNodeId()
NodeId
ConnectionAdapter getConnectionAdapter()
OutboundQueue getOutboundQueueProvider()
OutboundQueueProvider
void setOutboundQueueProvider(OutboundQueueProvider outboundQueueProvider)
outboundQueueProvider
- OutboundQueueProvider
ConnectionContext.CONNECTION_STATE getConnectionState()
ConnectionContext.CONNECTION_STATE
void setFeatures(FeaturesReply featuresReply)
featuresReply
- as received from device during handshakeFeaturesReply getFeatures()
void setDeviceDisconnectedHandler(DeviceDisconnectedHandler deviceDisconnectedHandler)
deviceDisconnectedHandler
- handler for disconnectString getSafeNodeIdForLOG()
void setOutboundQueueHandleRegistration(OutboundQueueHandlerRegistration<OutboundQueueProvider> outboundQueueHandlerRegistration)
void closeConnection(boolean propagate)
propagate
- true if event need to be propagated to higher contexts (device, stats, rpc..)
or false if invoked from higher contextConnectionAdapter.disconnect()
void onConnectionClosed()
void changeStateToHandshaking()
ConnectionContext.CONNECTION_STATE.HANDSHAKING
.void changeStateToTimeouting()
ConnectionContext.CONNECTION_STATE.TIMEOUTING
.void changeStateToWorking()
ConnectionContext.CONNECTION_STATE.WORKING
.DeviceInfo getDeviceInfo()
void handshakeSuccessful()
void handlePortStatusMessage(PortStatusMessage portStatusMessage)
portStatusMessage
- port status messageList<PortStatusMessage> retrieveAndClearPortStatusMessages()
Copyright © 2018 OpenDaylight. All rights reserved.