001package jmri.server.json.time;
002
003import com.fasterxml.jackson.databind.ObjectMapper;
004
005import jmri.server.json.JSON;
006import jmri.server.json.JsonConnection;
007import jmri.spi.JsonServiceFactory;
008import org.openide.util.lookup.ServiceProvider;
009
010/**
011 *
012 * @author Randall Wood
013 */
014@ServiceProvider(service = JsonServiceFactory.class)
015public class JsonTimeServiceFactory implements JsonServiceFactory<JsonTimeHttpService, JsonTimeSocketService> {
016
017    @Override
018    public String[] getTypes(String version) {
019        return new String[]{JSON.TIME};
020    }
021
022    @Override
023    public JsonTimeSocketService getSocketService(JsonConnection connection, String version) {
024        return new JsonTimeSocketService(connection);
025    }
026
027    @Override
028    public JsonTimeHttpService getHttpService(ObjectMapper mapper, String version) {
029        return new JsonTimeHttpService(mapper);
030    }
031
032}