Class ContainerUtilImpl

  • All Implemented Interfaces:
    ContainerUtil, org.glassfish.hk2.api.PreDestroy

    @Service
    public class ContainerUtilImpl
    extends Object
    implements ContainerUtil, org.glassfish.hk2.api.PreDestroy
    • Constructor Detail

      • ContainerUtilImpl

        public ContainerUtilImpl()
    • Method Detail

      • getContainerUtil

        public static ContainerUtil getContainerUtil()
      • getTimer

        public Timer getTimer()
        Description copied from interface: ContainerUtil
        Utility method to return a JDK Timer. Containers must use this timer instead of creating their own
        Specified by:
        getTimer in interface ContainerUtil
        Returns:
        Timer
      • scheduleTask

        public void scheduleTask​(Runnable runnable)
        Description copied from interface: ContainerUtil
        Utility method to schedule an asynchronous task. The implementation will prbaby choose a worker thread from a threadpool and execute the given runnable using the thread.
        Specified by:
        scheduleTask in interface ContainerUtil
      • preDestroy

        public void preDestroy()
        The component is about to be removed from commission
        Specified by:
        preDestroy in interface org.glassfish.hk2.api.PreDestroy