Interface SwitchConnectionProvider

All Superinterfaces:
AutoCloseable, DeserializerExtensionProvider, SerializerExtensionProvider
All Known Implementing Classes:
SwitchConnectionProviderImpl

public interface SwitchConnectionProvider extends AutoCloseable, SerializerExtensionProvider, DeserializerExtensionProvider
Provides handling for a switch connection.
Author:
mirehak, michal.polkorab
  • Method Details

    • getConfiguration

      ConnectionConfiguration getConfiguration()
      Returns the connection configuration.
      Returns:
      configuration [protocol, port, address and supported features]
    • startup

      com.google.common.util.concurrent.ListenableFuture<Boolean> startup()
      Start listening to switches, but please don't forget to do setSwitchConnectionHandler(SwitchConnectionHandler) first.
      Returns:
      future, triggered to true, when listening channel is up and running
    • shutdown

      com.google.common.util.concurrent.ListenableFuture<Boolean> shutdown()
      Stop listening to switches.
      Returns:
      future, triggered to true, when all listening channels are down
    • setSwitchConnectionHandler

      void setSwitchConnectionHandler(SwitchConnectionHandler switchConHandler)
      Sets the SwitchConnectionHandler.
      Parameters:
      switchConHandler - instance being informed when new switch connects