Interface ConnectionAdapter
- 
- All Superinterfaces:
- OpenflowProtocolService,- org.opendaylight.yangtools.yang.binding.RpcService
 - All Known Subinterfaces:
- ConnectionFacade
 - All Known Implementing Classes:
- ConnectionAdapterImpl
 
 public interface ConnectionAdapter extends OpenflowProtocolService Manages a switch connection.- Author:
- mirehak, michal.polkorab
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcheckListeners()Throws exception if any of required listeners is missing.Future<Boolean>disconnect()Disconnect corresponding switch.voidfireConnectionReadyNotification()Notify listener about connection ready-to-use event.InetSocketAddressgetRemoteAddress()Returns the address of the connected switch.booleanisAlive()Determines if the connection to the switch is alive.booleanisAutoRead()Determines if the channel is configured to auto-read.voidonSwitchCertificateIdentified(X509Certificate switchcertificate)Notify listener about switch certificate information.<T extends OutboundQueueHandler>
 OutboundQueueHandlerRegistration<T>registerOutboundQueueHandler(T handler, int maxQueueDepth, long maxBarrierNanos)Registers a new bypass outbound queue.voidsetAlienMessageListener(AlienMessageListener alienMessageListener)Set handler for alien messages received from device.voidsetAutoRead(boolean autoRead)Sets option for automatic channel reading - if set to false, incoming messages won't be read.voidsetConnectionReadyListener(ConnectionReadyListener connectionReadyListener)Set listener for connection became ready-to-use event.voidsetDatapathId(BigInteger datapathId)Set datapathId for the dpn.voidsetExecutorService(ExecutorService executorService)Sets executorService.voidsetMessageListener(OpenflowProtocolListener messageListener)Sets the protocol message listener.voidsetPacketInFiltering(boolean enabled)Set filtering of PacketIn messages.voidsetSystemListener(SystemNotificationsListener systemListener)Sets the system message listener.- 
Methods inherited from interface org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OpenflowProtocolServicebarrier, echo, echoReply, experimenter, flowMod, getAsync, getConfig, getFeatures, getQueueConfig, groupMod, hello, meterMod, multipartRequest, packetOut, portMod, roleRequest, setAsync, setConfig, tableMod
 
- 
 
- 
- 
- 
Method Detail- 
disconnectFuture<Boolean> disconnect() Disconnect corresponding switch.- Returns:
- future set to true, when disconnect completed
 
 - 
isAliveboolean isAlive() Determines if the connection to the switch is alive.- Returns:
- true, if connection to switch is alive
 
 - 
getRemoteAddressInetSocketAddress getRemoteAddress() Returns the address of the connected switch.- Returns:
- address of the remote end - address of a switch if connected
 
 - 
setMessageListenervoid setMessageListener(OpenflowProtocolListener messageListener) Sets the protocol message listener.- Parameters:
- messageListener- here will be pushed all messages from switch
 
 - 
setSystemListenervoid setSystemListener(SystemNotificationsListener systemListener) Sets the system message listener.- Parameters:
- systemListener- here will be pushed all system messages from library
 
 - 
setAlienMessageListenervoid setAlienMessageListener(AlienMessageListener alienMessageListener) Set handler for alien messages received from device.- Parameters:
- alienMessageListener- here will be pushed all alien messages from switch
 
 - 
checkListenersvoid checkListeners() Throws exception if any of required listeners is missing.
 - 
fireConnectionReadyNotificationvoid fireConnectionReadyNotification() Notify listener about connection ready-to-use event.
 - 
onSwitchCertificateIdentifiedvoid onSwitchCertificateIdentified(X509Certificate switchcertificate) Notify listener about switch certificate information.- Parameters:
- switchcertificate- X509Certificate of switch
 
 - 
setConnectionReadyListenervoid setConnectionReadyListener(ConnectionReadyListener connectionReadyListener) Set listener for connection became ready-to-use event.- Parameters:
- connectionReadyListener- listens to connection ready event
 
 - 
setAutoReadvoid setAutoRead(boolean autoRead) Sets option for automatic channel reading - if set to false, incoming messages won't be read.- Parameters:
- autoRead- target value to be switched to
 
 - 
isAutoReadboolean isAutoRead() Determines if the channel is configured to auto-read.- Returns:
- true, if channel is configured to auto-read
 
 - 
registerOutboundQueueHandler@Beta <T extends OutboundQueueHandler> OutboundQueueHandlerRegistration<T> registerOutboundQueueHandler(T handler, int maxQueueDepth, long maxBarrierNanos) Registers a new bypass outbound queue.- Type Parameters:
- T- handler type
- Parameters:
- handler- queue handler
- maxQueueDepth- max amount of not confirmed messaged in queue (i.e. edge for barrier message)
- maxBarrierNanos- regular base for barrier message
- Returns:
- An OutboundQueueHandlerRegistration
 
 - 
setPacketInFiltering@Beta void setPacketInFiltering(boolean enabled) Set filtering of PacketIn messages. By default these messages are not filtered.- Parameters:
- enabled- True if PacketIn messages should be filtered, false if they should be reported.
 
 - 
setDatapathIdvoid setDatapathId(BigInteger datapathId) Set datapathId for the dpn.- Parameters:
- datapathId- of the dpn
 
 - 
setExecutorServicevoid setExecutorService(ExecutorService executorService) Sets executorService.- Parameters:
- executorService- for all dpns
 
 
- 
 
-