2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org
.argeo
.slc
.detached
;
19 import java
.util
.Properties
;
21 /** A request sent to the detached server. */
22 public class DetachedRequest
implements DetachedCommunication
{
23 static final long serialVersionUID
= 1l;
26 private Properties properties
= new Properties();
28 private String path
= "";
30 private Object cachedObject
= null;
32 public DetachedRequest() {
36 public DetachedRequest(String uuid
) {
40 /** The properties configuring this request. */
41 public Properties
getProperties() {
45 public void setProperties(Properties inputParameters
) {
46 this.properties
= inputParameters
;
50 * A reference to the underlying implementation which will process the
53 public String
getRef() {
57 public void setRef(String stepRef
) {
61 /** A path identifying the request within its source context. */
62 public String
getPath() {
66 public void setPath(String path
) {
70 /** The unique identifier of this request. */
71 public String
getUuid() {
75 public void setUuid(String uuid
) {
79 public String
toString() {
80 StringBuffer buf
= new StringBuffer("detached request for ref ");
82 buf
.append(" #").append(uuid
);
83 buf
.append(" cachedObject=").append((cachedObject
!= null));
84 buf
.append(" path=").append(path
);
85 buf
.append(" properties=").append(properties
);
86 return buf
.toString();
90 * Optimization. Allows the driver to eagerly cache the object in the
91 * request, in order to relieve the detached server of the task to look for
92 * it. No implementation should rely on this to be set.
94 public Object
getCachedObject() {
98 public void setCachedObject(Object cachedObject
) {
99 this.cachedObject
= cachedObject
;