Class EndLoopComponent

  • All Implemented Interfaces:
    java.util.Map

    public class EndLoopComponent
    extends AssemblyLineComponent
    This class is used by the Assemblyline to mark the end of a loop
    • Constructor Detail

      • EndLoopComponent

        public EndLoopComponent​(AssemblyLine parent,
                                LoopComponent loop)
        This constructor is used to insert the EndLoop component in the AL
        Parameters:
        parent - The AssemblyLine this EndLoopComponent is part of
        loop - The LoopComponent that we end
    • Method Detail

      • willExecute

        public boolean willExecute​(Entry work)
        This method always returns true.
        Overrides:
        willExecute in class AssemblyLineComponent
        Parameters:
        work - an Entry object
        Returns:
        true
      • getType

        public int getType()
        Return the type of this component
        Overrides:
        getType in class AssemblyLineComponent
        Returns:
        ServerConstants.TYPE_LOOP
      • add

        public void add​(Entry meta)
                 throws java.lang.Exception
        Tells the AssemblyLine to go back to the start of the loop
        Overrides:
        add in class AssemblyLineComponent
        Parameters:
        meta - The work Entry. Ignored
        Throws:
        java.lang.Exception - if we cannot go back to the start of the loop
      • handleException

        public void handleException​(java.lang.String oper,
                                    java.lang.Throwable e,
                                    Entry meta)
                             throws java.lang.Exception
        Handles Exceptions by rethrowing them
        Overrides:
        handleException in class AssemblyLineComponent
        Parameters:
        oper - Ignored
        e - The Throwable that is rethrown
        meta - The work Entry. Ignored
        Throws:
        java.lang.Exception - e
      • trigger

        public boolean trigger​(java.lang.String oper,
                               Entry work,
                               Entry conn)
        Calls Hooks. There are no Hooks.
        Overrides:
        trigger in class AssemblyLineComponent
        Parameters:
        oper - a Srting for the operation
        work - an Entry object
        conn - an Entry object
        Returns:
        always false
      • trigger

        public boolean trigger​(java.lang.String oper,
                               Entry work)
        Calls Hooks. There are no Hooks.
        Overrides:
        trigger in class AssemblyLineComponent
        Parameters:
        oper - an Entry object
        work - an Entry object
        Returns:
        always false
      • close

        public void close()
                   throws java.lang.Exception
        Releases resources
        Overrides:
        close in class AssemblyLineComponent
        Throws:
        java.lang.Exception - if a problem occurs