1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.jdiagnose.remote;
17
18 import org.jdiagnose.RemoteResult;
19 import org.jdiagnose.ResultInfo;
20
21 /***
22 * Represents information about an agent, including the host name and agent
23 * name. It is also used to createRemoteResults, provide Guid's and SequenceNumbers.
24 * @author jmccrindle
25 */
26 public interface Agent {
27
28 /***
29 * @return The host that the agent is running on.
30 */
31 String getHost();
32
33 /***
34 * @return The agent that the diagnostics are running in
35 */
36 String getAgent();
37
38 /***
39 * @return The next sequence number for this agent
40 */
41 long nextSequenceNumber();
42
43 /***
44 * @return a globally unique identifier
45 */
46 String nextGuid();
47
48 /***
49 * Creates a remote result from a regular result
50 * @param result the result to wrap
51 * @return a remote result with agent, host, guid and sequenceNumber set.
52 */
53 RemoteResult createRemoteResult(ResultInfo result);
54 }