summaryrefslogtreecommitdiffstats
blob: c93f467cc5654a719166d1ea0406d1212b568b01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * Copyright (c) 2015, Isode Limited, London, England.
 * All rights reserved.
 */
/*
 * Copyright (c) 2011 Tobias Markmann
 * Licensed under the BSD license.
 * See http://www.opensource.org/licenses/bsd-license.php for more information.
 */
package com.isode.stroke.parser.payloadparsers;

import com.isode.stroke.parser.AttributeMap;
import com.isode.stroke.parser.PayloadParser;
import com.isode.stroke.parser.PayloadParserFactory;

class DeliveryReceiptParserFactory implements PayloadParserFactory {

    public DeliveryReceiptParserFactory() {
    }

    @Override
    public boolean canParse(String element, String ns, AttributeMap attributes) {
        return "urn:xmpp:receipts".equals(ns) && "received".equals(element);
    }

    @Override
    public PayloadParser createPayloadParser() {
        return new DeliveryReceiptParser();
    }

}