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