]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.detached/src/main/java/org/argeo/slc/detached/DetachedRequest.java
Ignore log files
[gpl/argeo-slc.git] / runtime / org.argeo.slc.detached / src / main / java / org / argeo / slc / detached / DetachedRequest.java
1 package org.argeo.slc.detached;
2
3 import java.util.Properties;
4
5 /** A request sent to the detached server. */
6 public class DetachedRequest implements DetachedCommunication {
7 static final long serialVersionUID = 1l;
8
9 private String uuid;
10 private Properties properties = new Properties();
11 private String ref;
12 private String path = "";
13
14 private Object cachedObject = null;
15
16 public DetachedRequest() {
17
18 }
19
20 public DetachedRequest(String uuid) {
21 this.uuid = uuid;
22 }
23
24 /** The properties configuring this request. */
25 public Properties getProperties() {
26 return properties;
27 }
28
29 public void setProperties(Properties inputParameters) {
30 this.properties = inputParameters;
31 }
32
33 /**
34 * A reference to the underlying implementation which will process the
35 * request.
36 */
37 public String getRef() {
38 return ref;
39 }
40
41 public void setRef(String stepRef) {
42 this.ref = stepRef;
43 }
44
45 /** A path identifying the request within its source context. */
46 public String getPath() {
47 return path;
48 }
49
50 public void setPath(String path) {
51 this.path = path;
52 }
53
54 /** The unique identifier of this request. */
55 public String getUuid() {
56 return uuid;
57 }
58
59 public void setUuid(String uuid) {
60 this.uuid = uuid;
61 }
62
63 public String toString() {
64 StringBuffer buf = new StringBuffer("detached request for ref ");
65 buf.append(ref);
66 buf.append(" #").append(uuid);
67 buf.append(" cachedObject=").append((cachedObject != null));
68 buf.append(" path=").append(path);
69 buf.append(" properties=").append(properties);
70 return buf.toString();
71 }
72
73 /**
74 * Optimization. Allows the driver to eagerly cache the object in the
75 * request, in order to relieve the detached server of the task to look for
76 * it. No implementation should rely on this to be set.
77 */
78 public Object getCachedObject() {
79 return cachedObject;
80 }
81
82 public void setCachedObject(Object cachedObject) {
83 this.cachedObject = cachedObject;
84 }
85
86 }