Mineplex2018-withcommit/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AsyncJsonWebCall.java

64 lines
1.5 KiB
Java
Raw Normal View History

2015-05-13 09:00:37 +02:00
package mineplex.chestConverter;
import mineplex.core.common.util.Callback;
public class AsyncJsonWebCall extends JsonWebCall
{
public AsyncJsonWebCall(String url)
{
super(url);
}
public void Execute()
{
Thread asyncThread = new Thread(new Runnable()
{
public void run()
{
AsyncJsonWebCall.super.Execute();
}
});
asyncThread.start();
}
public void Execute(final Object argument)
{
Thread asyncThread = new Thread(new Runnable()
{
public void run()
{
AsyncJsonWebCall.super.Execute(argument);
}
});
asyncThread.start();
}
public <T> void Execute(final Class<T> callbackClass, final Callback<T> callback)
{
Thread asyncThread = new Thread(new Runnable()
{
public void run()
{
AsyncJsonWebCall.super.Execute(callbackClass, callback);
}
});
asyncThread.start();
}
public <T> void Execute(final Class<T> callbackClass, final Callback<T> callback, final Object argument)
{
Thread asyncThread = new Thread(new Runnable()
{
public void run()
{
AsyncJsonWebCall.super.Execute(callbackClass, callback, argument);
}
});
asyncThread.start();
}
}