Annotation Type DestroyMethod


  • @Retention(RUNTIME)
    @Target(METHOD)
    public @interface DestroyMethod
    Designates a method corresponding to the portlet API destroy method. The annotated method must have the following signature:

    public void <methodName>()

    where the method name can be freely selected.

    the destroy method is called by the portlet container to indicate to a portlet that the portlet is being taken out of service.

    Before the portlet container calls the destroy method, it should allow any threads that are currently processing requests within the portlet object to complete execution. To avoid waiting forever, the portlet container can optionally wait for a predefined time before destroying the portlet object.

    This method enables the portlet to do the following:

    • clean up any resources that it holds (for example, memory, file handles, threads)
    • make sure that any persistent state is synchronized with the portlet current state in memory.
    Since:
    3.0
    See Also:
    Portlet.destroy()
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String value
      The portlet name for the annotated method.
    • Element Detail

      • value

        String value
        The portlet name for the annotated method.
        Returns:
        The portlet name