public class ConnectionContextImpl extends Object implements ConnectionContext
ConnectionContext.CONNECTION_STATE| Constructor and Description |
|---|
ConnectionContextImpl(ConnectionAdapter connectionAdapter)
Constructor.
|
| 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.
|
boolean |
equals(Object object) |
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()
Get safe nodeId for logging.
|
void |
handlePortStatusMessage(PortStatusMessage portStatusMessage)
Handle received port status message.
|
void |
handshakeSuccessful()
This method creates a basic device information.
|
int |
hashCode() |
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 newFeaturesReply)
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> newRegistration) |
void |
setOutboundQueueProvider(OutboundQueueProvider outboundQueueProvider)
Method sets reference to OFJava outbound queue provider.
|
public ConnectionContextImpl(ConnectionAdapter connectionAdapter)
connectionAdapter - - connection adapterpublic ConnectionAdapter getConnectionAdapter()
ConnectionContextgetConnectionAdapter in interface ConnectionContextpublic OutboundQueue getOutboundQueueProvider()
ConnectionContextgetOutboundQueueProvider in interface ConnectionContextOutboundQueueProviderpublic void setOutboundQueueProvider(OutboundQueueProvider outboundQueueProvider)
ConnectionContextsetOutboundQueueProvider in interface ConnectionContextoutboundQueueProvider - OutboundQueueProviderpublic ConnectionContext.CONNECTION_STATE getConnectionState()
ConnectionContextgetConnectionState in interface ConnectionContextConnectionContext.CONNECTION_STATEpublic org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId getNodeId()
ConnectionContextgetNodeId in interface ConnectionContextNodeIdpublic void setNodeId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId nodeId)
ConnectionContextsetNodeId in interface ConnectionContextnodeId - node idpublic FeaturesReply getFeatures()
ConnectionContextgetFeatures in interface ConnectionContextpublic void setDeviceDisconnectedHandler(DeviceDisconnectedHandler deviceDisconnectedHandler)
ConnectionContextsetDeviceDisconnectedHandler in interface ConnectionContextdeviceDisconnectedHandler - handler for disconnectpublic void setFeatures(FeaturesReply newFeaturesReply)
ConnectionContextsetFeatures in interface ConnectionContextnewFeaturesReply - as received from device during handshakepublic void closeConnection(boolean propagate)
ConnectionContextcloseConnection in interface ConnectionContextpropagate - true if event need to be propagated to higher contexts (device, stats, rpc..)
or false if invoked from higher contextConnectionAdapter.disconnect()public void onConnectionClosed()
ConnectionContextonConnectionClosed in interface ConnectionContextpublic String getSafeNodeIdForLOG()
getSafeNodeIdForLOG in interface ConnectionContextpublic void setOutboundQueueHandleRegistration(OutboundQueueHandlerRegistration<OutboundQueueProvider> newRegistration)
setOutboundQueueHandleRegistration in interface ConnectionContextpublic void changeStateToHandshaking()
ConnectionContextConnectionContext.CONNECTION_STATE.HANDSHAKING.changeStateToHandshaking in interface ConnectionContextpublic void changeStateToTimeouting()
ConnectionContextConnectionContext.CONNECTION_STATE.TIMEOUTING.changeStateToTimeouting in interface ConnectionContextpublic void changeStateToWorking()
ConnectionContextConnectionContext.CONNECTION_STATE.WORKING.changeStateToWorking in interface ConnectionContextpublic void handlePortStatusMessage(PortStatusMessage portStatusMessage)
ConnectionContexthandlePortStatusMessage in interface ConnectionContextportStatusMessage - port status messagepublic List<PortStatusMessage> retrieveAndClearPortStatusMessages()
retrieveAndClearPortStatusMessages in interface ConnectionContextpublic DeviceInfo getDeviceInfo()
ConnectionContextgetDeviceInfo in interface ConnectionContextpublic void handshakeSuccessful()
ConnectionContexthandshakeSuccessful in interface ConnectionContextpublic void setHandshakeContext(HandshakeContext handshakeContext)
ConnectionContextsetHandshakeContext in interface ConnectionContexthandshakeContext - corresponding handshake context used upon this connectionCopyright © 2019 OpenDaylight. All rights reserved.