T - factory of protocol produced by this factory. Note, main reason to have this general factory
is autoconfiguration capabilities, see ProtocolUtils.protocolFactoryPair(ProtocolFactory)
for technical details of configuration process.public interface ProtocolFactory<T extends Protocol>
Interface of a factory that creates instances of a protocols of the given factory.
| Modifier and Type | Method and Description |
|---|---|
T |
createProtocol(GatewayContext gatewayContext) |
default java.lang.Class<T> |
protocolType()
Provides a type of protocol that this factory can produce.
|
T createProtocol(GatewayContext gatewayContext)
default java.lang.Class<T> protocolType()
Provides a type of protocol that this factory can produce.
Note, if concrete ProtocolFactory decides to implement this method, contract to
return only types that the factory can produce is strictly required to apply.