Class BackgroundTask


  • public abstract class BackgroundTask
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.ExecutorService es  
      private java.util.concurrent.Future<?> future  
      private java.lang.Object[] objects  
    • Constructor Summary

      Constructors 
      Constructor Description
      BackgroundTask​(java.lang.Object... objects)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getObject​(int i)  
      java.lang.Object getResult()  
      abstract java.lang.Object run()  
      • Methods inherited from class java.lang.Object

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

      • objects

        private final java.lang.Object[] objects
      • future

        private final java.util.concurrent.Future<?> future
      • es

        private final java.util.concurrent.ExecutorService es
    • Constructor Detail

      • BackgroundTask

        public BackgroundTask​(java.lang.Object... objects)
    • Method Detail

      • run

        public abstract java.lang.Object run()
      • getResult

        public java.lang.Object getResult()
                                   throws java.lang.InterruptedException,
                                          java.util.concurrent.ExecutionException
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • getObject

        public final java.lang.Object getObject​(int i)