GenericTransportInfo.java

 1package eu.siacs.conversations.xmpp.jingle.stanzas;
 2
 3import com.google.common.base.Preconditions;
 4
 5import eu.siacs.conversations.xml.Element;
 6
 7public class GenericTransportInfo extends Element {
 8
 9    protected GenericTransportInfo(String name, String xmlns) {
10        super(name, xmlns);
11    }
12
13    public static GenericTransportInfo upgrade(final Element element) {
14        Preconditions.checkArgument("transport".equals(element.getName()));
15        final GenericTransportInfo transport = new GenericTransportInfo("transport", element.getNamespace());
16        transport.setAttributes(element.getAttributes());
17        transport.setChildren(element.getChildren());
18        return transport;
19    }
20}