Class SingletonConnectionSelector<T extends Connection>

java.lang.Object
uk.ac.manchester.spinnaker.connections.SingletonConnectionSelector<T>
Type Parameters:
T - The type of the connection.
All Implemented Interfaces:
ConnectionSelector<T>

public class SingletonConnectionSelector<T extends Connection> extends Object implements ConnectionSelector<T>
A selector that only ever handles a single connection.
  • Constructor Details

    • SingletonConnectionSelector

      public SingletonConnectionSelector(T connection)
      Create a selector.
      Parameters:
      connection - The connection in the selector.
  • Method Details

    • getNextConnection

      public T getNextConnection(SCPRequest<?> request)
      Description copied from interface: ConnectionSelector
      Get the next connection for the process from a list of connections that might satisfy the request.
      Specified by:
      getNextConnection in interface ConnectionSelector<T extends Connection>
      Parameters:
      request - The SCP message to be sent
      Returns:
      The connection on which the message should be sent.