Interface ITokenFactory<T,RT extends IToken<?>>

Type Parameters:
T - The type of requesttoken.
RT - The requesttoken type.
All Superinterfaces:
IFactory<T,RT>
All Known Implementing Classes:
AbstractTokenFactory, InitializedTokenFactory, RandomSeededTokenFactory, StandardTokenFactory

public interface ITokenFactory<T,RT extends IToken<?>> extends IFactory<T,RT>
Marker interface used to specify a factory for requesttokens. Restricts the output type of the general factory interface to IToken
  • Method Details

    • getNewInstance

      @NotNull default RT getNewInstance(@NotNull @NotNull IFactoryController factoryController, @NotNull T t, @NotNull @NotNull Object... context) throws IllegalArgumentException
      Method to get a new instance of the output given the input and additional context data.
      Specified by:
      getNewInstance in interface IFactory<T,RT extends IToken<?>>
      Parameters:
      factoryController - The factory controller that calls the factory method.
      t - The input to build a new output for.
      context - The context of the token.
      Returns:
      The new output instance for a given input.
      Throws:
      IllegalArgumentException - is thrown when the factory cannot produce a new instance out of the given context and input.
    • getNewInstance

      @NotNull RT getNewInstance(@NotNull T input)
      Method to get a new instance of a token given the input and token.
      Parameters:
      input - The input to build a new token for.
      Returns:
      The new output instance for a given input.