if (LOG.isDebugEnabled()) {
LOG.debug("Iq Private " + debugString(iq) + " any: " + query.getAny());
}
Iq result = createResult(iq);
jabber.iq._private.Query answer = new jabber.iq._private.Query();
result.setAny(answer);
transport.marshall(result);
} else if (any instanceof jabber.iq.roster.Query) {
jabber.iq.roster.Query query = (jabber.iq.roster.Query)any;
if (LOG.isDebugEnabled()) {
LOG.debug("Iq Roster " + debugString(iq) + " item: " + query.getItem());
}
Iq result = createResult(iq);
jabber.iq.roster.Query roster = new jabber.iq.roster.Query();
result.setAny(roster);
transport.marshall(result);
} else if (any instanceof org.jabber.protocol.disco_items.Query) {
onDiscoItems(iq, (org.jabber.protocol.disco_items.Query)any);
} else if (any instanceof org.jabber.protocol.disco_info.Query) {
onDiscoInfo(iq, (org.jabber.protocol.disco_info.Query)any);
} else {
if (any instanceof Element) {
Element element = (Element)any;
LOG.warn("Iq Unknown " + debugString(iq) + " element namespace: " + element.getNamespaceURI() + " localName: " + element.getLocalName());
} else {
LOG.warn("Iq Unknown " + debugString(iq) + " any: " + any + " of type: " + any.getClass().getName());
}
Iq result = createResult(iq);
jabber.client.Error error = new Error();
error.setUnexpectedRequest("Don't understand: " + any.toString());
result.setAny(error);
transport.marshall(result);
}
}