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 Summary
Constructors Constructor Description SingletonConnectionSelector(T connection)
Create a selector. -
Method Summary
Modifier and Type Method Description T
getNextConnection(SCPRequest<?> request)
Get the next connection for the process from a list of connections that might satisfy the request.
-
Constructor Details
-
SingletonConnectionSelector
Create a selector.- Parameters:
connection
- The connection in the selector.
-
-
Method Details
-
getNextConnection
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 interfaceConnectionSelector<T extends Connection>
- Parameters:
request
- The SCP message to be sent- Returns:
- The connection on which the message should be sent.
-