package nl.tudelft.simulation.naming.context; import java.util.Hashtable; import javax.naming.NamingException; /** * This interface represents a factory that creates an initial context. It is based on the InitialContentFactory from * javax.naming but creates a lightweight ContextInterface rather than the heavyweight JNDI context. *

* Copyright (c) 2020-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See * for project information https://simulation.tudelft.nl. The DSOL * project is distributed under a three-clause BSD-style license, which can be found at * * https://simulation.tudelft.nl/dsol/3.0/license.html. *

* @author Alexander Verbraeck */ public interface ContextFactory { /** * Creates an Initial Context for beginning name resolution. Special requirements of this context are supplied using * environment. * @param environment The possibly null environment specifying information to be used in the creation of the initial context * @return A non-null initial context object that implements the ContextInterface * @throws NamingException when the initial context could not be created */ ContextInterface getInitialContext(Hashtable environment) throws NamingException; }