001/** 002 * 003 * Copyright the original author or authors 004 * 005 * Licensed under the Apache License, Version 2.0 (the "License"); 006 * you may not use this file except in compliance with the License. 007 * You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.jivesoftware.smackx.delay.provider; 018 019import org.jivesoftware.smack.packet.PacketExtension; 020import org.jivesoftware.smackx.delay.packet.DelayInfo; 021import org.jivesoftware.smackx.delay.packet.DelayInformation; 022import org.xmlpull.v1.XmlPullParser; 023 024/** 025 * This provider simply creates a {@link DelayInfo} decorator for the {@link DelayInformation} that 026 * is returned by the superclass. This allows the new code using 027 * <a href="http://xmpp.org/extensions/xep-0203.html">Delay Information XEP-0203</a> to be 028 * backward compatible with <a href="http://xmpp.org/extensions/xep-0091.html">XEP-0091</a>. 029 * 030 * <p>This provider must be registered in the <b>smack.properties</b> file for the element 031 * <b>delay</b> with namespace <b>urn:xmpp:delay</b></p> 032 * 033 * @author Robin Collier 034 */ 035public class DelayInfoProvider extends DelayInformationProvider 036{ 037 038 @Override 039 public PacketExtension parseExtension(XmlPullParser parser) throws Exception 040 { 041 return new DelayInfo((DelayInformation)super.parseExtension(parser)); 042 } 043 044}