com.kolibrifx.plovercrest.server.local.DefaultPlovercrestProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plovercrest-server Show documentation
Show all versions of plovercrest-server Show documentation
Plovercrest server library.
The newest version!
/*
* Copyright (c) 2010-2017, KolibriFX AS. Licensed under the Apache License, version 2.0.
*/
package com.kolibrifx.plovercrest.server.local;
import java.io.File;
import com.kolibrifx.plovercrest.client.PlovercrestLocal;
import com.kolibrifx.plovercrest.client.PlovercrestProvider;
import com.kolibrifx.plovercrest.client.TableSerializerFactory;
import com.kolibrifx.plovercrest.client.remote.DefaultPlovercrestRemoteProvider;
public class DefaultPlovercrestProvider extends DefaultPlovercrestRemoteProvider implements PlovercrestProvider {
public DefaultPlovercrestProvider(final TableSerializerFactory serializerFactory) {
super(serializerFactory);
}
@Override
public PlovercrestLocal createLocal(final String path) {
final File file = new File(path);
if (!file.exists()) {
file.mkdirs();
}
return new DefaultPlovercrestLocal(serializerFactory, path);
}
}