-
Notifications
You must be signed in to change notification settings - Fork 125
/
SessionVariable.java
66 lines (52 loc) · 1.43 KB
/
SessionVariable.java
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
Pulsar
Copyright (C) 2013-2015 eBay Software Foundation
Licensed under the GPL v2 license. See LICENSE for full terms.
*/
package com.ebay.pulsar.sessionizer.esper.impl;
import com.ebay.pulsar.sessionizer.model.AbstractSession;
import com.ebay.pulsar.sessionizer.model.Session;
/**
* Session variable for the Esper.
*
* @author xingwang
*
*/
public class SessionVariable extends AttributeMapVariable {
private AbstractSession data;
private Session mainSession;
public String getSessionId() {
return data.getSessionId();
}
public long getDuration() {
return data.getDuration();
}
public int getBotEventCount() {
return mainSession.getBotEventCount();
}
public int getBotType() {
return mainSession.getBotType();
}
public long getCreationTime() {
return data.getCreationTime();
}
public int getEventCount() {
return data.getEventCount();
}
public long getExpirationTime() {
return data.getExpirationTime();
}
public long getFirstEventTimestamp() {
return data.getFirstEventTimestamp();
}
public String getIdentifier() {
return data.getIdentifier();
}
public long getLastModifiedTime() {
return data.getLastModifiedTime();
}
public void resetSessionData(AbstractSession data, Session mainSession) {
this.data = data;
this.mainSession = mainSession;
}
}