Last active
December 19, 2015 01:38
-
-
Save soapplied/5877005 to your computer and use it in GitHub Desktop.
get SIBQueuePoint attributes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final Iterator it = queueNameSet.iterator(); | |
while (it.hasNext()) { | |
final ObjectName obj = (ObjectName) it.next(); | |
final String name = obj.getKeyProperty("name"); | |
AttributeList attribList = server.getAttributes(obj, | |
new String[] { "depth", "state", "id", | |
"highMessageThreshold", "sendAllowed" }); | |
Long depth = null; | |
String state = ""; | |
String id = ""; | |
Long highMessageThreshold = null; | |
Boolean sendAllowed = null; | |
for (Iterator j = attribList.iterator(); j.hasNext();) { | |
final Attribute a = (Attribute) j.next(); | |
if (a.getName().equals("depth")) | |
depth = (Long) a.getValue(); | |
else if (a.getName().equals("state")) | |
state = (String) a.getValue(); | |
else if (a.getName().equals("id")) | |
id = (String) a.getValue(); | |
else if (a.getName().equals("highMessageThreshold")) | |
highMessageThreshold = (Long) a.getValue(); | |
else if (a.getName().equals("sendAllowed")) | |
sendAllowed = (Boolean) a.getValue(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment