All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.danidemi.jlubricant.embeddable.hsql.ServerMode Maven / Gradle / Ivy

There is a newer version: 0.0.15
Show newest version
package com.danidemi.jlubricant.embeddable.hsql;

import java.io.File;

import com.danidemi.jlubricant.embeddable.hsql.HsqlDbms.Registration;

public class ServerMode extends Storage {

	private final File dbFolder;

	public ServerMode(File newFolder) {
		this.dbFolder = newFolder;
	}

	public String getAbsolutePath() {
		return dbFolder.getAbsolutePath();
	}
	
	@Override
	public boolean requireStandaloneServer() {
		return true;
	}	
	
	@Override
	protected void doRegister(HsqlDatabase hsqlDatabase, Registration registration) {
		registration.register(hsqlDatabase.getName(), dbFolder);
	}

	@Override
	public String getProtocol() {
		return "hsql";
	}

	@Override
	public String getLocation(String dbName, HsqlDbms dbms) {
		return "//" + dbms.getHostName() + "/" + dbName;
	}


	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy