Java 类org.jivesoftware.smackx.pubsub.ItemPublishEvent 实例源码

项目:msf-spaces-sdk-android    文件:DataHandler.java   
/**
 * Item handler of this data handler implementation. Checks if received items are already cached,
 * if not, it caches them. Ultimately it sends the items to the subscribed listeners.
 */
@Override
public void handlePublishedItems(ItemPublishEvent<PayloadItem<SimplePayload>> items){
    String spaceId = getSpaceId(items.getNodeId());
    if (spaceId == null) return;
    List<String> toRequest = new ArrayList<String>();
    for (PayloadItem<SimplePayload> item:items.getItems()){
        if (item.getPayload() == null && !pendingPayloadRequests.containsKey(item.getId())){
            toRequest.add(item.getId());
            continue;
        }
        DataObject obj = parseItemToDataObject(item);
        if (dataObjectFilter == null || dataObjectFilter.isDataObjectValid(obj)) {
            if (!datawrapper.isDataObjectAlreadyCached(item.getId())){
                datawrapper.saveDataObject(items.getNodeId(), obj, item.getId());
            }
            for (DataObjectListener listener:listeners){
                listener.handleDataObject(obj, spaceId);
            }
        }
    }
    if (!toRequest.isEmpty()){
        for (String id:toRequest){
            try {
                retrievePayload(items.getNodeId(), id);
            } catch (Exception e) {
                //Ignore
                continue;
            }
        }
    }
}
项目:Smack    文件:ItemEventListener.java   
/**
 * Called whenever an item is published to the node the listener
 * is registered with.
 * 
 * @param items The publishing details.
 */
void handlePublishedItems(ItemPublishEvent<T> items);
项目:EIM    文件:ItemEventListener.java   
/**
 * Called whenever an item is published to the node the listener
 * is registered with.
 * 
 * @param items The publishing details.
 */
void handlePublishedItems(ItemPublishEvent<T> items);
项目:androidPN-client.    文件:ItemEventListener.java   
/**
 * Called whenever an item is published to the node the listener
 * is registered with.
 * 
 * @param items The publishing details.
 */
void handlePublishedItems(ItemPublishEvent<T> items);
项目:xmppsupport_v2    文件:ItemEventListener.java   
/**
 * Called whenever an item is published to the node the listener is
 * registered with.
 * 
 * @param items
 *            The publishing details.
 */
void handlePublishedItems(ItemPublishEvent<T> items);
项目:java-bells    文件:ItemEventListener.java   
/**
 * Called whenever an item is published to the node the listener
 * is registered with.
 * 
 * @param items The publishing details.
 */
void handlePublishedItems(ItemPublishEvent<T> items);
项目:telegraph    文件:ItemEventListener.java   
/**
 * Called whenever an item is published to the node the listener
 * is registered with.
 * 
 * @param items The publishing details.
 */
void handlePublishedItems(ItemPublishEvent<T> items);
项目:NewCommunication-Android    文件:ItemEventListener.java   
/**
 * Called whenever an item is published to the node the listener
 * is registered with.
 * 
 * @param items The publishing details.
 */
void handlePublishedItems(ItemPublishEvent<T> items);