]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/runtime/SlcAgentDescriptor.java
Deal with destruction callbacks
[gpl/argeo-slc.git] / runtime / org.argeo.slc.specs / src / main / java / org / argeo / slc / runtime / SlcAgentDescriptor.java
1 /*
2 * Copyright (C) 2007-2012 Mathieu Baudier
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16 package org.argeo.slc.runtime;
17
18 import java.io.Serializable;
19 import java.util.ArrayList;
20 import java.util.List;
21
22 import org.argeo.slc.execution.ExecutionModuleDescriptor;
23
24 public class SlcAgentDescriptor implements Cloneable, Serializable {
25 private static final long serialVersionUID = 1L;
26 private String uuid;
27 private String host;
28 private List<ExecutionModuleDescriptor> moduleDescriptors = new ArrayList<ExecutionModuleDescriptor>();
29
30 public SlcAgentDescriptor() {
31
32 }
33
34 public SlcAgentDescriptor(SlcAgentDescriptor template) {
35 uuid = template.uuid;
36 host = template.host;
37 moduleDescriptors.addAll(template.moduleDescriptors);
38 }
39
40 public String getUuid() {
41 return uuid;
42 }
43
44 public void setUuid(String uuid) {
45 this.uuid = uuid;
46 }
47
48 public String getHost() {
49 return host;
50 }
51
52 public void setHost(String host) {
53 this.host = host;
54 }
55
56 public List<ExecutionModuleDescriptor> getModuleDescriptors() {
57 return moduleDescriptors;
58 }
59
60 public void setModuleDescriptors(
61 List<ExecutionModuleDescriptor> modulesDescriptors) {
62 this.moduleDescriptors = modulesDescriptors;
63 }
64
65 @Override
66 public String toString() {
67 return host + " #" + uuid;
68 }
69 }