blob: 228c09315877ff38cc882d3e06018a9b73a1581b (
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
32
33
34
35
36
37
38
39
|
/*
* Copyright (c) 2012 Isode Limited, London, England.
* All rights reserved.
*/
/*
* Copyright (c) 2010 Remko Tronçon
* All rights reserved.
*/
package com.isode.stroke.parser.payloadparsers;
import com.isode.stroke.elements.Form;
import com.isode.stroke.parser.AttributeMap;
import com.isode.stroke.parser.PayloadParser;
import com.isode.stroke.parser.PayloadParserFactory;
/**
* Parser factory for {@link Form} element.
*/
public class FormParserFactory implements PayloadParserFactory {
/**
* Constructor
*/
public FormParserFactory() {
}
public boolean canParse(String element, String ns, AttributeMap attributes) {
return ns.equals("jabber:x:data");
}
public PayloadParser createPayloadParser() {
return new FormParser();
}
@Override
public String toString() {
return FormParserFactory.class.getSimpleName();
}
}
|