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
32 lines (30 loc) · 1 KB
/
Copy pathSimplePollHandler.java
File metadata and controls
32 lines (30 loc) · 1 KB
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
28
29
30
31
32
/**
* Copyright (C) 2004-2016, GoodData(R) Corporation. All rights reserved.
* This source code is licensed under the BSD-style license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
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 abstract 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);
}
}