com.wrapper.spotify.SpotifyApiThreading Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spotify-web-api-java Show documentation
Show all versions of spotify-web-api-java Show documentation
A Java client for Spotify's Web API
package com.wrapper.spotify;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
public class SpotifyApiThreading {
public static final ExecutorService THREADPOOL = Executors.newCachedThreadPool();
public static Future executeAsync(final Callable callable) {
return SpotifyApiThreading.THREADPOOL.submit(new Callable() {
public T call() throws Exception {
return callable.call();
}
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy