Back to project page BehatReporter.
The source code is released under:
Copyright (C) 2013 Fabian Kiss <headrevision@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software...
If you think the Android project BehatReporter listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package headrevision.BehatReporter.report; /* ww w . j a v a 2 s. c o m*/ import android.os.AsyncTask; import com.fasterxml.jackson.databind.JsonNode; public class LoaderTask extends AsyncTask<String, Void, JsonNode> { private Loader loader; private LoaderTaskListener listener; public LoaderTask(LoaderTaskListener listener) { super(); this.listener = listener; } @Override protected JsonNode doInBackground(String... urls) { String url = urls[0]; loader = new Loader(); return loader.load(url); } @Override protected void onPreExecute() { listener.onLoaderTaskExecutionBegin(); } @Override protected void onPostExecute(JsonNode result) { if (loader.hasExceptionOccurred()) { listener.onLoaderTaskExecutionFailure(loader.getException()); } else { listener.onLoaderTaskExecutionCompletion(result); } } }