public MyLocationBundle call() throws Exception { MyLocationBundle bundle = new MyLocationBundle(); try { Thread.sleep(5000); } catch (InterruptedException ex) { Logger.e(ex); } return bundle; }
public void run() { try { ExecutorService service = Executors.newSingleThreadExecutor(); Future<MyLocationBundle> futureBundle = service.submit(c); service.shutdownNow(); service.isTerminated(); Logger.e(futureBundle.get().toString()); } catch (Exception e) { } }
public static void e(String message) { Logger.e(message); }
public static void w(String message) { Logger.w(message); }
public static void e(Exception ex) { Logger.e(ex); }