blob: cb0bbd5cdcb5bc9d4e76c81b13aa50627bf6eb09 [file] [log] [blame]
package org.eclipse.basyx.examples.contexts;
import org.eclipse.basyx.components.aas.servlet.AASAggregatorServlet;
import org.eclipse.basyx.components.registry.servlet.InMemoryRegistryServlet;
import org.eclipse.basyx.vab.protocol.http.server.BaSyxContext;
/**
* BaSyx context that contains an Industrie 4.0 Servlet infrastructure <br>
* - One in-memory AAS Server that receives and hosts asset administration
* shells and submodels<br>
* - One in-memory registry that manages AAS and sub model registrations<br>
*
* @author kuhn, schnicke
*
*/
public class BaSyxExamplesContext extends BaSyxContext {
/**
* Version of serialized instance
*/
private static final long serialVersionUID = 1L;
private static final String CONTEXT = "/basys.examples";
private static final String AASSERVERFRAGMENT = "/Components/AasServer/";
public static final String AASSERVERURL = CONTEXT + AASSERVERFRAGMENT;
private static final String REGISTRYFRAGMENT = "/Components/Registry/";
public static final String REGISTRYURL = CONTEXT + REGISTRYFRAGMENT;
/**
* Constructor
*/
public BaSyxExamplesContext() {
// Invoke base constructor to set up Tomcat server in basys.components context
super(CONTEXT, "");
// Define Servlet infrastucture
addServletMapping(REGISTRYFRAGMENT + "*", new InMemoryRegistryServlet());
addServletMapping(AASSERVERFRAGMENT + "*", new AASAggregatorServlet());
}
}