forked from gooddata/gooddata-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimplePollHandler.java
More file actions
27 lines (25 loc) · 797 Bytes
/
Copy pathSimplePollHandler.java
File metadata and controls
27 lines (25 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.gooddata;
/**
* For internal use by services employing polling.<p>
* A simple poll handler using same type for polling and result.
*
* @param <T> polling and result type
*
* @see com.gooddata.FutureResult
*/
public class SimplePollHandler<T> extends AbstractPollHandler<T, T> {
/**
* Creates a new instance of polling handler
*
* @param pollingUri URI for polling
* @param pollAndResultClass class of the polling object and result (or {@link Void})
*/
@SuppressWarnings("unchecked")
public SimplePollHandler(String pollingUri, Class pollAndResultClass) {
super(pollingUri, pollAndResultClass, pollAndResultClass);
}
@Override
public void handlePollResult(T pollResult) {
setResult(pollResult);
}
}