Class ShellCommands

  • All Implemented Interfaces:
    org.springframework.shell.core.CommandMarker, org.springframework.shell.core.ExecutionProcessor
    Direct Known Subclasses:
    FileCommands, SessionCommnds, TableCommands

    @Component
    public abstract class ShellCommands
    extends java.lang.Object
    implements org.springframework.shell.core.ExecutionProcessor
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ShellCommands()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterReturningInvocation​(org.springframework.shell.event.ParseResult invocationContext, java.lang.Object result)
      Method called after successfully invoking the target command (described by ParseResult).
      void afterThrowingInvocation​(org.springframework.shell.event.ParseResult invocationContext, java.lang.Throwable thrown)
      Method called after invoking the target command (described by ParseResult) had thrown an exception .
      org.springframework.shell.event.ParseResult beforeInvocation​(org.springframework.shell.event.ParseResult invocationContext)
      Method called before invoking the target command (described by ParseResult).
      protected org.ojai.json.JsonOptions getCmdJsonOptions​(java.lang.String withTags, java.lang.String pretty)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShellCommands

        protected ShellCommands()
                         throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getCmdJsonOptions

        protected org.ojai.json.JsonOptions getCmdJsonOptions​(java.lang.String withTags,
                                                              java.lang.String pretty)
      • beforeInvocation

        public org.springframework.shell.event.ParseResult beforeInvocation​(org.springframework.shell.event.ParseResult invocationContext)
        Method called before invoking the target command (described by ParseResult). Additionally, for advanced cases, the parse result itself effectively changing the invocation calling site.
        Specified by:
        beforeInvocation in interface org.springframework.shell.core.ExecutionProcessor
        Parameters:
        invocationContext - target command context
        Returns:
        the invocation target
      • afterReturningInvocation

        public void afterReturningInvocation​(org.springframework.shell.event.ParseResult invocationContext,
                                             java.lang.Object result)
        Method called after successfully invoking the target command (described by ParseResult).
        Specified by:
        afterReturningInvocation in interface org.springframework.shell.core.ExecutionProcessor
        Parameters:
        invocationContext - target command context
        result - the invocation result
      • afterThrowingInvocation

        public void afterThrowingInvocation​(org.springframework.shell.event.ParseResult invocationContext,
                                            java.lang.Throwable thrown)
        Method called after invoking the target command (described by ParseResult) had thrown an exception .
        Specified by:
        afterThrowingInvocation in interface org.springframework.shell.core.ExecutionProcessor
        Parameters:
        invocationContext - target command context
        thrown - the thrown object