Package org.jivesoftware.smack.filter

Examples of org.jivesoftware.smack.filter.OrFilter


    private void registerListener()
    {
        PacketFilter normalTypeFilter = new MessageTypeFilter(Message.Type.normal);
        PacketFilter chatTypeFilter = new MessageTypeFilter(Message.Type.chat);
        PacketFilter mucTypeFilter = new MessageTypeFilter(Message.Type.groupchat);
        PacketFilter filter = new OrFilter(normalTypeFilter, chatTypeFilter);
        filter = new OrFilter(filter, mucTypeFilter);

        if (synchronous)
        {
            packetCollector = connection.createPacketCollector(filter);
        }
View Full Code Here


    }

    @Override
    protected PacketFilter createFilter()
    {
        return new OrFilter(getLeftFilter(), getRightFilter());
    }
View Full Code Here

    PacketListener delListener = new ItemDeleteTranslator(listener);
    itemDeleteToListenerMap.put(listener, delListener);
    EventContentFilter deleteItem = new EventContentFilter(EventElementType.items.toString(), "retract");
    EventContentFilter purge = new EventContentFilter(EventElementType.purge.toString());
   
    con.addPacketListener(delListener, new OrFilter(deleteItem, purge));
  }
View Full Code Here

    public PacketFilter getInitiationPacketFilter(String from, String streamID) {
        if (primaryFilter == null || secondaryFilter == null) {
            primaryFilter = primaryNegotiator.getInitiationPacketFilter(from, streamID);
            secondaryFilter = secondaryNegotiator.getInitiationPacketFilter(from, streamID);
        }
        return new OrFilter(primaryFilter, secondaryFilter);
    }
View Full Code Here

    public PacketFilter getInitiationPacketFilter(String from, String streamID) {
        if (primaryFilter == null || secondaryFilter == null) {
            primaryFilter = primaryNegotiator.getInitiationPacketFilter(from, streamID);
            secondaryFilter = secondaryNegotiator.getInitiationPacketFilter(from, streamID);
        }
        return new OrFilter(primaryFilter, secondaryFilter);
    }
View Full Code Here

    public PacketFilter getInitiationPacketFilter(String from, String streamID) {
        if (primaryFilter == null || secondaryFilter == null) {
            primaryFilter = primaryNegotiator.getInitiationPacketFilter(from, streamID);
            secondaryFilter = secondaryNegotiator.getInitiationPacketFilter(from, streamID);
        }
        return new OrFilter(primaryFilter, secondaryFilter);
    }
View Full Code Here

    }

    @Override
    protected PacketFilter createFilter()
    {
        return new OrFilter(getLeftFilter(), getRightFilter());
    }
View Full Code Here

    private void registerListener()
    {
        PacketFilter normalTypeFilter = new MessageTypeFilter(Message.Type.normal);
        PacketFilter chatTypeFilter = new MessageTypeFilter(Message.Type.chat);
        PacketFilter mucTypeFilter = new MessageTypeFilter(Message.Type.groupchat);
        PacketFilter filter = new OrFilter(normalTypeFilter, chatTypeFilter);
        filter = new OrFilter(filter, mucTypeFilter);

        if (synchronous)
        {
            packetCollector = connection.createPacketCollector(filter);
        }
View Full Code Here

    PacketListener delListener = new ItemDeleteTranslator(listener);
    itemDeleteToListenerMap.put(listener, delListener);
    EventContentFilter deleteItem = new EventContentFilter(EventElementType.items.toString(), "retract");
    EventContentFilter purge = new EventContentFilter(EventElementType.purge.toString());
   
    con.addPacketListener(delListener, new OrFilter(deleteItem, purge));
  }
View Full Code Here

    public PacketFilter getInitiationPacketFilter(String from, String streamID) {
        if (primaryFilter == null || secondaryFilter == null) {
            primaryFilter = primaryNegotiator.getInitiationPacketFilter(from, streamID);
            secondaryFilter = secondaryNegotiator.getInitiationPacketFilter(from, streamID);
        }
        return new OrFilter(primaryFilter, secondaryFilter);
    }
View Full Code Here

TOP

Related Classes of org.jivesoftware.smack.filter.OrFilter

Copyright © 2018 www.massapicom. 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.