55 |
|
try { Thread.sleep(_interval); } catch(Exception e) {} |
56 |
|
// check the Queue |
57 |
|
String status = _sourceQueue.xmlStatus(); |
58 |
+ |
// get a hash of our Queue (for identification) |
59 |
+ |
String hashCode = String.valueOf(_sourceQueue.hashCode()); |
60 |
|
// create some XML |
61 |
|
String date = new Long(System.currentTimeMillis()/((long) 1000)).toString(); |
62 |
< |
String xml = "<packet type=\"queueStat\" date=\""+date+"\" name=\""+_srcName+"\">" + status + "</packet>"; |
62 |
> |
String xml = "<packet type=\"queueStat\" date=\""+date+"\" name=\""+_srcName+"\" hashCode=\""+hashCode+"\">" + status + "</packet>"; |
63 |
|
// write XML to destination Queue |
64 |
|
_destQueue.add(xml); |
65 |
|
} |
71 |
|
public void shutdown() { |
72 |
|
// this will stop the main loop |
73 |
|
_run = false; |
74 |
+ |
// create some XML |
75 |
+ |
String date = new Long(System.currentTimeMillis()/((long) 1000)).toString(); |
76 |
+ |
String xml = "<packet type=\"queueStat\" date=\""+date+"\" name=\""+_srcName+"\" shutdown=\"true\"></packet>"; |
77 |
+ |
// write XML to destination Queue |
78 |
+ |
_destQueue.add(xml); |
79 |
|
} |
80 |
|
|
81 |
|
/** |