blob: 37e011f1413e6d7aa561bb34188417be9b08e30a [file] [log] [blame]
package org.eclipse.basyx.components.registry.servlet;
import org.eclipse.basyx.aas.registration.restapi.DirectoryModelProvider;
import org.eclipse.basyx.components.configuration.BaSyxSQLConfiguration;
import org.eclipse.basyx.components.registry.sql.SQLRegistry;
import org.eclipse.basyx.vab.protocol.http.server.VABHTTPInterface;
/**
* A registry servlet based on an SQL database. The servlet therefore provides an implementation
* for the IAASRegistryService interface with a permanent storage solution.
*
* @author kuhn, pschorn, espen
*/
public class SQLRegistryServlet extends VABHTTPInterface<DirectoryModelProvider> {
private static final long serialVersionUID = 1L;
/**
* Provide HTTP interface with JSONProvider to handle serialization and
* SQLDirectoryProvider as backend
*/
public SQLRegistryServlet() {
super(new DirectoryModelProvider(new SQLRegistry()));
}
public SQLRegistryServlet(BaSyxSQLConfiguration sqlConfig) {
super(new DirectoryModelProvider(new SQLRegistry(sqlConfig)));
}
}