Skip to content

Commit 0c233cd

Browse files
committed
Update README.md
1 parent b932556 commit 0c233cd

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,27 +82,22 @@ For local file request (using FileRequest) process will be return FILE_SUCCESS o
8282
Request execution example:
8383

8484
```java
85-
DataProcessor.getInstance (). ExecuteAsync (request, LoginResult.class, handler);
85+
DataProcessor.getInstance (). ExecuteAsync (request, LoginResult.class, callback);
8686
```
8787

88-
Sample processing Handler:
88+
Sample of processing callback:
8989

9090
```java
91-
private DataProcessor.Callback getLoginCallback () {
92-
return new DataProcessor.Callback() {
91+
private DataProcessor.Callback<ItemArray> getLoginCallback () {
92+
return new DataProcessor.Callback<ItemArray>() {
9393

9494
@Override
95-
public void onFinish(final Object obj, final int what) {
95+
public void onFinish(ItemArray items, int what) {
9696
acMainProgressLayout.setVisibility(View.GONE);
9797
if (what == HttpStatus.SC_OK) {
98-
adapter.init(obj);
98+
adapter.init(items);
9999
} else {
100-
Exception ex = (Exception) obj;
101-
if (ex instanceof IOException) {
102-
Log.e("IO Error", ex);
103-
} else {
104-
Log.e("Error", ex);
105-
}
100+
Log.e("Error, What=" + what);
106101
}
107102
}
108103
}

0 commit comments

Comments
 (0)