1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.gwe.drivers.netAccess;
18
19 import java.util.HashMap;
20 import java.util.Map;
21
22 import org.gwe.drivers.ResourceHandle;
23 import org.gwe.utils.security.ResourceLink;
24
25
26
27
28
29 public abstract class HostHandle extends ResourceHandle {
30
31 public HostHandle(ResourceLink<HostHandle> link) {
32 super(link);
33 }
34
35 public final String runCommand(String cmd) throws ConnectorException {
36 return runCommand(cmd, null, new HashMap<String,String>());
37 }
38
39 public String runCommand(String cmd, String path, Map<String, String> env) throws ConnectorException {
40 return runCommand(new ShellCommand(cmd, path, env));
41 }
42
43 public abstract String runCommand(ShellCommand command) throws ConnectorException;
44 }