root/src/java/src/com/omniti/reconnoiter/event/NoitStatus.java

Revision e8b241b833cdda315cc463b322a89ba888c5e781, 1.6 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 5 years ago)

juggle files around for cleaner builds.

  • Property mode set to 100644
Line 
1 /*
2  * Copyright (c) 2009, OmniTI Computer Consulting, Inc.
3  * All rights reserved.
4  * The software in this package is published under the terms of the GPL license
5  * a copy of which can be found at:
6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE
7  */
8
9 package com.omniti.reconnoiter.event;
10
11 import com.omniti.reconnoiter.event.NoitEvent;
12
13 public class NoitStatus extends NoitEvent {
14   String uuid;
15   Long time;
16   String status;
17   String state;
18   String availability;
19   Double duration;
20   String noit;
21   String check_target;
22   String check_module;
23   String check_name;
24
25   public String getPrefix() {
26     return "S";
27   }
28
29   /*
30    'S' REMOTE TIMESTAMP UUID STATE AVAILABILITY DURATION STATUS_MESSAGE
31    */
32   public NoitStatus() {}
33   public NoitStatus(String[] parts) throws Exception {
34     super(parts);
35     String id[] = extended_id_split(parts[3]);
36     noit = parts[1];
37     check_target = id[0];
38     check_module = id[1];
39     check_name = id[2];
40     uuid = id[3];
41     state = parts[4];
42     availability = parts[5];
43     duration = Double.parseDouble(parts[6]);
44     status = parts[7];
45     time = timeToLong(parts[2]);
46   }
47
48   public String getUuid() { return uuid; }
49   public Long getTime() { return time; }
50   public String getStatus() { return status; }
51   public String getState() { return state; }
52   public String getAvailability() { return availability; }
53   public Double getDuration() { return duration; }
54   public String getNoit() { return noit; }
55   public String getCheck_target() { return check_target; }
56   public String getCheck_module() { return check_module; }
57   public String getCheck_name() { return check_name; }
58
59   public int numparts() { return 8; }
60 }
Note: See TracBrowser for help on using the browser.