1 /**
2 * .
3 */
4 package org.sirius.client.core;
5
6 import org.sirius.client.core.system.dir.DirectoryOperationsProxy;
7 import org.sirius.client.core.system.file.FileOperationsProxy;
8 import org.sirius.client.core.system.process.ProcessOperationsProxy;
9 import org.sirius.client.core.system.sys.SystemOperationsProxy;
10
11 /**
12 * The main class which provides interface to Sirius Core methods.
13 * It is used for multiple purposes:
14 * <ul>
15 * <li> it is used as the container for the proxy classes interacting with Server side.
16 * <li> for the API users it's the highest level object which provides interaction with Server Core components.
17 * </ul>
18 * @author Myk Kolisnyk
19 */
20 public class CoreClient {
21
22 /**
23 * Reference for the proxy class responsible for interaction with directories.
24 */
25 private DirectoryOperationsProxy dirProxy;
26
27 /**
28 * Reference for the proxy class responsible for interaction with files.
29 */
30 private FileOperationsProxy fileProxy;
31
32 /**
33 * Reference for the proxy class responsible for interaction with system processes.
34 */
35 private ProcessOperationsProxy processProxy;
36
37 /**
38 * Reference for the proxy class responsible for interaction with system options.
39 */
40 private SystemOperationsProxy systemProxy;
41
42 /**
43 * Provides interface for the operations interacting with directories.
44 * @return the instance of Directory operations client
45 */
46 public final DirectoryOperationsProxy dir() {
47 return dirProxy;
48 }
49
50 /**
51 * Provides interface for the operations interacting with files.
52 * @return the instance of File operations client
53 */
54 public final FileOperationsProxy file() {
55 return fileProxy;
56 }
57
58 /**
59 * Provides interface for the operations interacting with processes in the system.
60 * @return the instance of Process client
61 */
62 public final ProcessOperationsProxy process() {
63 return processProxy;
64 }
65
66 /**
67 * Provides interface for the operations interacting with general system options.
68 * @return the instance of System object
69 */
70 public final SystemOperationsProxy system() {
71 return systemProxy;
72 }
73
74 /**
75 * Creates instance of CoreClient object initializing Server connection with default endpoint address.
76 * For the Core component it's <b>http://localhost:21212</b>
77 */
78 public CoreClient() {
79 dirProxy = new DirectoryOperationsProxy();
80 fileProxy = new FileOperationsProxy();
81 processProxy = new ProcessOperationsProxy();
82 systemProxy = new SystemOperationsProxy();
83 }
84
85 }