Class StartableLifecycleStrategy

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose​(java.lang.Object component)
      Invoke the "dispose" method on the component instance if this is disposable.
      protected void disposeComponent​(java.lang.Object component)  
      protected java.lang.Class getDisposableInterface()  
      protected java.lang.String getDisposeMethodName()
      Retrieve the lifecycle method name that represents the dispose method.
      protected java.lang.Class getStartableInterface()  
      protected java.lang.String getStartMethodName()
      Retrieve the lifecycle method name that represents the start method.
      protected java.lang.String getStopMethodName()
      Retrieve the lifecycle method name that represents the stop method.
      boolean hasLifecycle​(java.lang.Class<?> type)
      Test if a component instance has a lifecycle.
      void start​(java.lang.Object component)
      Invoke the "start" method on the component instance if this is startable.
      protected void startComponent​(java.lang.Object component)  
      void stop​(java.lang.Object component)
      Invoke the "stop" method on the component instance if this is stoppable.
      protected void stopComponent​(java.lang.Object component)  
      • Methods inherited from class java.lang.Object

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

      • StartableLifecycleStrategy

        public StartableLifecycleStrategy​(ComponentMonitor monitor)
    • Method Detail

      • getDisposeMethodName

        protected java.lang.String getDisposeMethodName()
        Retrieve the lifecycle method name that represents the dispose method.
        Returns:
        the dispose method name. ('dispose')
      • getStopMethodName

        protected java.lang.String getStopMethodName()
        Retrieve the lifecycle method name that represents the stop method.
        Returns:
        the stop method name ('stop')
      • getStartMethodName

        protected java.lang.String getStartMethodName()
        Retrieve the lifecycle method name that represents the start method.
        Returns:
        the stop method name ('start')
      • start

        public void start​(java.lang.Object component)
        Invoke the "start" method on the component instance if this is startable. It is up to the implementation of the strategy what "start" and "startable" means.
        Parameters:
        component - the instance of the component to start
      • startComponent

        protected void startComponent​(java.lang.Object component)
      • stopComponent

        protected void stopComponent​(java.lang.Object component)
      • disposeComponent

        protected void disposeComponent​(java.lang.Object component)
      • stop

        public void stop​(java.lang.Object component)
        Invoke the "stop" method on the component instance if this is stoppable. It is up to the implementation of the strategy what "stop" and "stoppable" means.
        Parameters:
        component - the instance of the component to stop
      • dispose

        public void dispose​(java.lang.Object component)
        Invoke the "dispose" method on the component instance if this is disposable. It is up to the implementation of the strategy what "dispose" and "disposable" means.
        Parameters:
        component - the instance of the component to dispose
      • hasLifecycle

        public boolean hasLifecycle​(java.lang.Class<?> type)
        Test if a component instance has a lifecycle.
        Parameters:
        type - the component's type
        Returns:
        true if the component has a lifecycle
      • getDisposableInterface

        protected java.lang.Class getDisposableInterface()
      • getStartableInterface

        protected java.lang.Class getStartableInterface()