示例#1
0
 private boolean acceptMessage(Packet packet) {
   if (packet != null && packet instanceof Message) {
     for (PacketExtension pe : packet.getExtensions())
       if (pe instanceof LogPacketExtension) return true;
   }
   return false;
 }
示例#2
0
  @Override
  public void processPacket(Packet packet) {
    if (smackXmpp == null) {
      logger.error("Not initialized");
      return;
    }

    if (packet instanceof ColibriConferenceIQ) {
      handleColibriIq((ColibriConferenceIQ) packet);
    } else if (packet instanceof MuteIq) {
      handleMuteIq((MuteIq) packet);
    } else if (packet instanceof RayoIqProvider.DialIq) {
      handleRayoIQ((RayoIqProvider.DialIq) packet);
    } else if (packet instanceof Message) {
      handleMessage((Message) packet);
    } else if (packet instanceof Presence) {
      handlePresence((Presence) packet);
    } else {
      logger.error("Unexpected packet: " + packet.toXML());
    }
  }