dmqId = null;
for (Iterator subs = subsTable.values().iterator(); subs.hasNext();)
((ClientSubscription) subs.next()).setDMQId(dmqId);
replyToTopic(new AdminReply(true, null), not.getReplyTo(), not.getRequestMsgId(), not.getReplyMsgId());
} else if (adminRequest instanceof SetThresholdRequest) {
setSave(); // state change, so save.
threshold = ((SetThresholdRequest) adminRequest).getThreshold();
for (Iterator subs = subsTable.values().iterator(); subs.hasNext();)
((ClientSubscription) subs.next()).setThreshold(threshold);
replyToTopic(new AdminReply(true, null), not.getReplyTo(), not.getRequestMsgId(), not.getReplyMsgId());
} else if (adminRequest instanceof SetNbMaxMsgRequest) {
setSave(); // state change, so save.
int nbMaxMsg = ((SetNbMaxMsgRequest) adminRequest).getNbMaxMsg();
AdminReply reply = null;
String subName = ((SetNbMaxMsgRequest) adminRequest).getSubName();
if (subName == null) {
// Set the default subscription of this user
this.nbMaxMsg = nbMaxMsg;
reply =new AdminReply(true, null);
} else {
// Set the given subscription
ClientSubscription sub = (ClientSubscription) subsTable.get(subName);
if (sub != null) {
sub.setNbMaxMsg(nbMaxMsg);
reply = new AdminReply(true, null);
} else {
reply = new AdminReply(AdminReply.NAME_UNKNOWN, "Subscription unknow: " + subName);
}
}
replyToTopic(reply, not.getReplyTo(), not.getRequestMsgId(), not.getReplyMsgId());
} else if (adminRequest instanceof DeleteUser) {
deleteProxy(not);
} else if (adminRequest instanceof AdminCommandRequest) {
doReact((AdminCommandRequest) adminRequest, not.getReplyTo(), not.getRequestMsgId());
} else {
logger.log(BasicLevel.ERROR, "Unknown administration request for proxy " + getId());
replyToTopic(new AdminReply(AdminReply.UNKNOWN_REQUEST, null), not.getReplyTo(), not.getRequestMsgId(),
not.getReplyMsgId());
}
}