Class LookupInvoker<C extends LookupContext>

java.lang.Object
org.apache.maven.cling.invoker.LookupInvoker<C>
Type Parameters:
C - The context type.
All Implemented Interfaces:
AutoCloseable, Invoker
Direct Known Subclasses:
EncryptInvoker, MavenInvoker

public abstract class LookupInvoker<C extends LookupContext> extends Object implements Invoker
Lookup invoker implementation, that boots up DI container.
  • Field Details

    • protoLookup

      protected final ProtoLookup protoLookup
  • Constructor Details

    • LookupInvoker

      public LookupInvoker(ProtoLookup protoLookup)
  • Method Details

    • invoke

      public int invoke(InvokerRequest invokerRequest) throws InvokerException
      Specified by:
      invoke in interface Invoker
      Throws:
      InvokerException
    • doInvoke

      protected int doInvoke(C context) throws Exception
      Throws:
      Exception
    • handleException

      protected InvokerException handleException(C context, Exception e) throws InvokerException
      Throws:
      InvokerException
    • createContext

      protected abstract C createContext(InvokerRequest invokerRequest) throws InvokerException
      Throws:
      InvokerException
    • pushCoreProperties

      protected void pushCoreProperties(C context) throws Exception
      Throws:
      Exception
    • pushUserProperties

      protected void pushUserProperties(C context) throws Exception
      Throws:
      Exception
    • validate

      protected void validate(C context) throws Exception
      Throws:
      Exception
    • prepare

      protected void prepare(C context) throws Exception
      Throws:
      Exception
    • configureLogging

      protected void configureLogging(C context) throws Exception
      Throws:
      Exception
    • createTerminal

      protected void createTerminal(C context)
    • doConfigureWithTerminal

      protected void doConfigureWithTerminal(C context, org.jline.terminal.Terminal terminal)
    • determineWriter

      protected Consumer<String> determineWriter(C context)
    • doDetermineWriter

      protected Consumer<String> doDetermineWriter(C context)
    • activateLogging

      protected void activateLogging(C context) throws Exception
      Throws:
      Exception
    • helpOrVersionAndMayExit

      protected void helpOrVersionAndMayExit(C context) throws Exception
      Throws:
      Exception
    • showVersion

      protected void showVersion(C context)
    • describe

      protected String describe(org.jline.terminal.Terminal terminal)
    • preCommands

      protected void preCommands(C context) throws Exception
      Throws:
      Exception
    • container

      protected void container(C context) throws Exception
      Throws:
      Exception
    • createContainerCapsuleFactory

      protected ContainerCapsuleFactory<C> createContainerCapsuleFactory()
    • postContainer

      protected void postContainer(C context) throws Exception
      Throws:
      Exception
    • lookup

      protected void lookup(C context) throws Exception
      Throws:
      Exception
    • init

      protected void init(C context) throws Exception
      Throws:
      Exception
    • postCommands

      protected void postCommands(C context) throws Exception
      Throws:
      Exception
    • settings

      protected void settings(C context) throws Exception
      Throws:
      Exception
    • settings

      protected void settings(C context, org.apache.maven.api.services.SettingsBuilder settingsBuilder) throws Exception
      Throws:
      Exception
    • customizeSettingsRequest

      protected void customizeSettingsRequest(C context, org.apache.maven.api.services.SettingsBuilderRequest settingsBuilderRequest) throws Exception
      Throws:
      Exception
    • customizeSettingsResult

      protected void customizeSettingsResult(C context, org.apache.maven.api.services.SettingsBuilderResult settingsBuilderResult) throws Exception
      Throws:
      Exception
    • mayDisableInteractiveMode

      protected boolean mayDisableInteractiveMode(C context, boolean proposedInteractive)
    • localRepositoryPath

      protected Path localRepositoryPath(C context)
    • populateRequest

      protected void populateRequest(C context, org.apache.maven.api.services.Lookup lookup, MavenExecutionRequest request) throws Exception
      Throws:
      Exception
    • populateRequestFromSettings

      protected void populateRequestFromSettings(MavenExecutionRequest request, org.apache.maven.api.settings.Settings settings) throws Exception
      Throws:
      Exception
    • calculateDegreeOfConcurrency

      protected int calculateDegreeOfConcurrency(String threadConfiguration)
    • isRunningOnCI

      protected boolean isRunningOnCI(C context)
    • execute

      protected abstract int execute(C context) throws Exception
      Throws:
      Exception