if (!IQ.Type.set.equals(packet.getType())) {
if (!IQ.Type.set.equals(packet.getType())) {
if (iq.getType().equals(IQ.Type.set)) { JID from = iq.getFrom(); JID to = iq.getTo();
if (IQ.Type.get.equals(packet.getType())) { replyPacket = IQ.createResultIQ(packet); Element dataStored = privateStorage.get(packet.getFrom().getNode(), dataElement);
protected void handleDiscoItems(IQ iq) { if (iq.getType().equals(org.xmpp.packet.IQ.Type.error)) { logger.info((new StringBuilder()).append("Received disco error - ") .append(iq).toString()); return; } if (iq.getType() != org.xmpp.packet.IQ.Type.get && iq.getType() != org.xmpp.packet.IQ.Type.set) { logger.info((new StringBuilder()).append("Not set or get - ") .append(iq).toString()); return; } if (iq.getType().equals(org.xmpp.packet.IQ.Type.get)) { JID jid = iq.getFrom(); if (jid != null && jid.getNode() != null && jid.getResource() != null) { sendDiscoItemsResult(iq); } } }
protected void handlePrivateData(IQ iq) throws UnsupportedOperationException, PacketException { if (iq.getType().equals(org.xmpp.packet.IQ.Type.error)) { logger.info((new StringBuilder()).append("Received disco error - ") .append(iq).toString()); return; } if (iq.getType() != org.xmpp.packet.IQ.Type.get && iq.getType() != org.xmpp.packet.IQ.Type.set) { logger.info((new StringBuilder()).append("Not set or get - ") .append(iq).toString()); return; } Element gtxProfile = iq.getChildElement().element( new QName(GlobalConstants.ELEMENT_NAME_PROFILE, new Namespace( "gtx", GlobalConstants.NAMESPACE))); if (gtxProfile != null) { handleGtxProfileIq(iq); } }
/** * Returns the type of this IQ. * * @return the IQ type. * @see Type */ public Type getType() { String type = element.attributeValue("type"); if (type != null) { return Type.valueOf(type); } else { return null; } }
/** * Sets the type of this IQ. * * @param type the IQ type. * @see Type */ public void setType(Type type) { element.addAttribute("type", type==null?null:type.toString()); }
@Override public IQ handleIQ(IQ packet) { if (Type.get.equals(packet.getType())) { return IQ.createResultIQ(packet); } return null; }
if (!IQ.Type.set.equals(packet.getType())) {
if ( iq.getType().equals( IQ.Type.get ) && "blocklist".equals( iq.getChildElement().getName() ) ) return response; else if ( iq.getType().equals( IQ.Type.set ) && "block".equals( iq.getChildElement().getName() ) ) else if ( iq.getType().equals( IQ.Type.set ) && "unblock".equals( iq.getChildElement().getName() ) )