com.octo.android.robospice.request.SpiceRequest Java Examples
The following examples show how to use
com.octo.android.robospice.request.SpiceRequest.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AuthActivity.java From android-atleap with Apache License 2.0 | 4 votes |
protected <T> void executeSpiceRequest(SpiceRequest<T> request, Object requestCacheKey, long cacheExpiryDuration, RequestListener<T> callback) { changeProgressBarVisibility(true); getSpiceManager().execute(request, requestCacheKey, cacheExpiryDuration, callback); }
Example #2
Source File: BaseFragment.java From android-atleap with Apache License 2.0 | 4 votes |
protected void executeSpiceRequest(SpiceRequest<T> request, Object requestCacheKey, long cacheExpiryDuration) { changeProgressBarVisibility(true); getSpiceManager().execute(request, requestCacheKey, cacheExpiryDuration, this); }
Example #3
Source File: ExportProgressDialog.java From wifi_backend with GNU General Public License v3.0 | 4 votes |
@Override protected SpiceRequest<ExportSpiceRequest.Result> getRequest() { return new ExportSpiceRequest(getContext(), uri); }
Example #4
Source File: ImportProgressDialog.java From wifi_backend with GNU General Public License v3.0 | 4 votes |
@Override protected SpiceRequest<ImportSpiceRequest.Result> getRequest() { return new ImportSpiceRequest(getActivity(), uri); }
Example #5
Source File: RobospiceTestCase.java From android-atleap with Apache License 2.0 | 3 votes |
protected <T> T makeRobospiceRequest(String fileName, SpiceRequest<T> spiceRequest) throws Exception { String jsonString = IOUtils.toString(getContext().getResources().getAssets().open(fileName)); mockWebServer.enqueue(new MockResponse().setBody(jsonString)); mockWebServer.play(); // when spiceManager.start(getContext()); String url = mockWebServer.getUrl("/").toString(); SetUrlInterface request = (SetUrlInterface) spiceRequest; request.setUrl(url); RequestListenerStub<T> requestListenerStub = new RequestListenerStub<T>(); // when spiceManager.execute(spiceRequest, TEST_CACHE_KEY, TEST_DURATION, requestListenerStub); requestListenerStub.await(REQUEST_COMPLETION_TIME_OUT); // com.blandware.android.atleap.test assertTrue(requestListenerStub.isSuccessful()); assertTrue(requestListenerStub.isExecutedInUIThread()); assertTrue(requestListenerStub.getResultHistory() != null); assertTrue(requestListenerStub.getResultHistory().size()> 0); return requestListenerStub.getResultHistory().get(0); }
Example #6
Source File: OperationProgressDialog.java From wifi_backend with GNU General Public License v3.0 | votes |
protected abstract SpiceRequest<R> getRequest();