Examples of ToContainsFilter


Examples of org.jivesoftware.smack.filter.ToContainsFilter

                LOG.debug("Opening private chat to " + privateChat.getParticipant());
            }
        } else {
            // add the presence packet listener to the connection so we only get packets that concerns us
            // we must add the listener before creating the muc
            final ToContainsFilter toFilter = new ToContainsFilter(endpoint.getParticipant());
            final AndFilter packetFilter = new AndFilter(new PacketTypeFilter(Presence.class), toFilter);
            connection.addPacketListener(this, packetFilter);

            muc = new MultiUserChat(connection, endpoint.resolveRoom(connection));
            muc.addMessageListener(this);
View Full Code Here

Examples of org.jivesoftware.smack.filter.ToContainsFilter

            ,serverCredentials.getResource(),
            true);
        //packetFilter = new AndFilter(new PacketTypeFilter(Message.class),
        //    new FromContainsFilter(XMPPConstants.GOOGLETALK_FROM));
        //packetFilter = new FromContainsFilter(XMPPConstants.GOOGLETALK_FROM);
        packetFilter = new ToContainsFilter("@gmail.com");
       
      } catch (XMPPException e1) {
        log.error("Error occured while connecting to Googletalk server.",e1);
        throw new AxisFault("Error occured while connecting to Googletalk server.");
     
View Full Code Here

Examples of org.jivesoftware.smack.filter.ToContainsFilter

    }

    @Override
    protected PacketFilter createFilter()
    {
        return new ToContainsFilter(pattern);
    }
View Full Code Here

Examples of org.jivesoftware.smack.filter.ToContainsFilter

            ,serverCredentials.getResource(),
            true);
        //packetFilter = new AndFilter(new PacketTypeFilter(Message.class),
        //    new FromContainsFilter(XMPPConstants.GOOGLETALK_FROM));
        //packetFilter = new FromContainsFilter(XMPPConstants.GOOGLETALK_FROM);
        packetFilter = new ToContainsFilter("@gmail.com");
       
      } catch (XMPPException e1) {
        log.error("Error occured while connecting to Googletalk server.",e1);
        throw new AxisFault("Error occured while connecting to Googletalk server.");
      }
View Full Code Here

Examples of org.jivesoftware.smack.filter.ToContainsFilter

                LOG.info("Open private chat to: " + privateChat.getParticipant());
            }
        } else {
            // add the presence packet listener to the connection so we only get packets that concers us
            // we must add the listener before creating the muc
            final ToContainsFilter toFilter = new ToContainsFilter(endpoint.getParticipant());
            final AndFilter packetFilter = new AndFilter(new PacketTypeFilter(Presence.class), toFilter);
            connection.addPacketListener(this, packetFilter);

            muc = new MultiUserChat(connection, endpoint.resolveRoom(connection));
            muc.addMessageListener(this);
View Full Code Here

Examples of org.jivesoftware.smack.filter.ToContainsFilter

                LOG.debug("Opening private chat to " + privateChat.getParticipant());
            }
        } else {
            // add the presence packet listener to the connection so we only get packets that concers us
            // we must add the listener before creating the muc
            final ToContainsFilter toFilter = new ToContainsFilter(endpoint.getParticipant());
            final AndFilter packetFilter = new AndFilter(new PacketTypeFilter(Presence.class), toFilter);
            connection.addPacketListener(this, packetFilter);

            muc = new MultiUserChat(connection, endpoint.resolveRoom(connection));
            muc.addMessageListener(this);
View Full Code Here

Examples of org.jivesoftware.smack.filter.ToContainsFilter

            }

        } else {
            // add the presence packet listener to the connection so we only get packets that concers us
            // we must add the listener before creating the muc
            final ToContainsFilter toFilter = new ToContainsFilter(endpoint.getParticipant());
            final AndFilter packetFilter = new AndFilter(new PacketTypeFilter(Presence.class), toFilter);
            connection.addPacketListener(this, packetFilter);

            muc = new MultiUserChat(connection, endpoint.resolveRoom(connection));
            muc.addMessageListener(this);
View Full Code Here

Examples of org.jivesoftware.smack.filter.ToContainsFilter

                }
            }
        } else {
            // add the presence packet listener to the connection so we only get packets that concerns us
            // we must add the listener before creating the muc
            final ToContainsFilter toFilter = new ToContainsFilter(endpoint.getParticipant());
            final AndFilter packetFilter = new AndFilter(new PacketTypeFilter(Presence.class), toFilter);
            connection.addPacketListener(this, packetFilter);

            muc = new MultiUserChat(connection, endpoint.resolveRoom(connection));
            muc.addMessageListener(this);
View Full Code Here

Examples of org.jivesoftware.smack.filter.ToContainsFilter

                    // System.out.println("XML:" + packet.toXML());
                }
            }
        };
        // Register the listener.
        connection.addPacketListener(myListener, new ToContainsFilter(chatRoom));
       
        String[] domain = chatRoom.split("@");
        Collection<RosterEntry> entries = roster.getEntries();
        for (RosterEntry entry : entries) {
            String entryName = entry.getName();
View Full Code Here

Examples of org.jivesoftware.smack.filter.ToContainsFilter

                }
            }
        } else {
            // add the presence packet listener to the connection so we only get packets that concerns us
            // we must add the listener before creating the muc
            final ToContainsFilter toFilter = new ToContainsFilter(endpoint.getParticipant());
            final AndFilter packetFilter = new AndFilter(new PacketTypeFilter(Presence.class), toFilter);
            connection.addPacketListener(this, packetFilter);

            muc = new MultiUserChat(connection, endpoint.resolveRoom(connection));
            muc.addMessageListener(this);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.