2005-01-28 23:59:40 +01:00
|
|
|
/**
|
|
|
|
*
|
2014-06-30 13:36:49 +02:00
|
|
|
* Copyright © 2014 Florian Schmaus
|
2005-01-28 23:59:40 +01:00
|
|
|
*
|
2014-02-17 18:57:38 +01:00
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
2005-01-28 23:59:40 +01:00
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2014-02-15 11:35:08 +01:00
|
|
|
package org.jivesoftware.smackx.delay.provider;
|
2005-01-28 23:59:40 +01:00
|
|
|
|
2005-07-28 02:42:29 +02:00
|
|
|
import java.text.ParseException;
|
|
|
|
import java.util.Date;
|
|
|
|
|
2014-06-01 12:23:13 +02:00
|
|
|
import org.jxmpp.util.XmppDateTime;
|
2010-08-15 15:20:48 +02:00
|
|
|
|
2005-01-28 23:59:40 +01:00
|
|
|
/**
|
|
|
|
* The DelayInformationProvider parses DelayInformation packets.
|
2018-05-09 23:06:12 +02:00
|
|
|
*
|
2014-06-30 13:36:49 +02:00
|
|
|
* @author Florian Schmaus
|
2005-01-28 23:59:40 +01:00
|
|
|
*/
|
2014-06-30 13:36:49 +02:00
|
|
|
public class DelayInformationProvider extends AbstractDelayInformationProvider {
|
2010-08-15 15:20:48 +02:00
|
|
|
|
2015-01-09 11:02:11 +01:00
|
|
|
public static final DelayInformationProvider INSTANCE = new DelayInformationProvider();
|
|
|
|
|
2014-06-30 13:36:49 +02:00
|
|
|
@Override
|
|
|
|
protected Date parseDate(String string) throws ParseException {
|
|
|
|
return XmppDateTime.parseXEP0082Date(string);
|
2005-01-28 23:59:40 +01:00
|
|
|
}
|
2014-06-30 13:36:49 +02:00
|
|
|
|
2005-01-28 23:59:40 +01:00
|
|
|
}
|