rval.put("NbMaxMsg", Integer.toString(queue.getNbMaxMsg()));
rval.put("getPendingMessages", Integer.toString(queue.getPendingMessages()));
rval.put("getPendingRequests", Integer.toString(queue.getPendingRequests()));
}
catch (ConnectException e) {
throw new HermesException(e);
}
catch (AdminException e){
throw new HermesException(e);
}
}else {
Topic topic = (Topic) getHermes().getSession().createTopic(dConfig.getName());
try{
checkConnected();
rval.put("Name", topic.getName());
rval.put("AdminName", topic.getAdminName());
rval.put("number of subscription",topic.getSubscriptions());
String[] ids = topic.getSubscriberIds();
for(int i=0;i< ids.length;i++){
User u = new User("user"+i,ids[i]);
final Subscription[] subs = u.getSubscriptions() ;
for (int j = 0 ; j < subs.length ; j++) {
rval.put("subscriber "+j,ids[i]+" : "+subs[j].getName()+"; Durable:"+subs[j].isDurable());
}
}
}catch (ConnectException e) {
throw new HermesException(e);
}catch (AdminException e){
throw new HermesException(e);
}
}
return rval;
}