1 package org
.argeo
.slc
.detached
;
4 import java
.util
.Vector
;
6 /** A session within the detached context. */
7 public class DetachedSession
{
8 public final static String PROP_DO_IT_AGAIN_POLICY
= "slc.detached.doItAgainPolicy";
9 public final static String SKIP_UNTIL_ERROR
= "skipUntilError";
10 public final static String REPLAY
= "replay";
12 private String uuid
= null;
13 private List requests
= new Vector();
14 private List answers
= new Vector();
15 private String doItAgainPolicy
= SKIP_UNTIL_ERROR
;
17 public boolean isClosed() {
18 if (answers
.size() > 0) {
19 DetachedAnswer answer
= (DetachedAnswer
) answers
20 .get(answers
.size() - 1);
21 return answer
.getStatus() == DetachedAnswer
.CLOSED_SESSION
;
27 public String
getDoItAgainPolicy() {
28 return doItAgainPolicy
;
31 public void setDoItAgainPolicy(String doItAgainPolicy
) {
32 this.doItAgainPolicy
= doItAgainPolicy
;
35 public List
getRequests() {
39 public String
getUuid() {
43 public void setUuid(String uuid
) {
47 public List
getAnswers() {
51 public String
toString() {
52 StringBuffer buf
= new StringBuffer(getClass().getName());
53 buf
.append("#").append(uuid
);
54 buf
.append(" doItAgainPolicy=").append(doItAgainPolicy
);
55 return buf
.toString();