if (url == null) {
return "Please pass a valid topic oid";
}
log.info(ME+": Administrative subscribe() of '" + url + "' for client '" + getId() + "' qos='" + qos + "'");
SubscribeKey uk = new SubscribeKey(glob, url);
SubscribeQos uq;
if (qos == null || qos.length() == 0 || qos.equalsIgnoreCase("String")) {
uq = new SubscribeQos(glob);
}
else {
uq = new SubscribeQos(glob, glob.getQueryQosFactory().readObject(qos));
}
SubscribeQosServer uqs = new SubscribeQosServer(glob, uq.getData());
String ret = glob.getRequestBroker().subscribe(this, uk.getData(), uqs);
SubscribeReturnQos tmp = new SubscribeReturnQos(glob, ret);
ret = "Subscribe '" + tmp.getSubscriptionId() + "' state is " + tmp.getState();
if (tmp.getStateInfo() != null)
ret += " " + tmp.getStateInfo();