| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
package org.kuali.rice.kim.sesn.timeouthandlers; |
| 17 |
|
|
| 18 |
|
import java.util.Map; |
| 19 |
|
|
| 20 |
|
import org.apache.commons.logging.Log; |
| 21 |
|
import org.apache.commons.logging.LogFactory; |
| 22 |
|
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
| 26 |
|
@author |
| 27 |
|
|
| 28 |
|
|
|
|
|
| 0% |
Uncovered Elements: 16 (16) |
Complexity: 5 |
Complexity Density: 0.5 |
|
| 29 |
|
public class GlobalTimeoutHandler extends AbstractTimeoutHandler { |
| 30 |
|
private int timeoutPeriod; |
| 31 |
|
|
| 32 |
|
private static final Log logger = LogFactory.getLog(GlobalTimeoutHandler.class); |
| 33 |
|
|
| 34 |
|
|
| 35 |
|
@return |
| 36 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 37 |
0
|
public int getTimeoutPeriod() {... |
| 38 |
0
|
return this.timeoutPeriod; |
| 39 |
|
} |
| 40 |
|
|
| 41 |
|
|
| 42 |
|
@param |
| 43 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 44 |
0
|
public void setTimeoutPeriod(int timeoutPeriod) {... |
| 45 |
0
|
this.timeoutPeriod = timeoutPeriod; |
| 46 |
|
} |
| 47 |
|
|
| 48 |
|
|
| 49 |
|
|
| 50 |
|
|
| 51 |
|
@param |
| 52 |
|
|
| 53 |
|
@return |
| 54 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 55 |
0
|
public int getTimeout(Map args) {... |
| 56 |
0
|
return timeoutPeriod; |
| 57 |
|
} |
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
@see |
| 64 |
|
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 2 |
Complexity Density: 0.29 |
|
| 65 |
0
|
public boolean hasTimedOut(Map args) {... |
| 66 |
0
|
boolean bRet = true; |
| 67 |
0
|
Long maxIdleTime = (Long)args.get("maxIdleTime"); |
| 68 |
|
|
| 69 |
0
|
if (maxIdleTime <= timeoutPeriod) { |
| 70 |
0
|
logger.debug("Not timed out: " + maxIdleTime + " " + timeoutPeriod); |
| 71 |
0
|
bRet = false; |
| 72 |
|
} else { |
| 73 |
0
|
logger.debug("Timed out: " + maxIdleTime + " " + timeoutPeriod); |
| 74 |
|
} |
| 75 |
0
|
return bRet; |
| 76 |
|
} |
| 77 |
|
|
| 78 |
|
} |
| 79 |
|
|