Interface ContextFactory
- All Known Implementing Classes:
JvmContextFactory
public interface ContextFactory
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-2025 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information DSOL Manual. The DSOL project is distributed under a three-clause BSD-style license, which can be found at DSOL License.
- Author:
- Alexander Verbraeck
-
Method Summary
Modifier and TypeMethodDescriptiongetInitialContext(Hashtable<?, ?> environment, String atomicName) Creates an Initial Context for beginning name resolution.
-
Method Details
-
getInitialContext
ContextInterface getInitialContext(Hashtable<?, ?> environment, String atomicName) throws NamingExceptionCreates an Initial Context for beginning name resolution. Special requirements of this context are supplied usingenvironment. Different implementations exist, such as the JvmContext, the FileContext and the RemoteContext. A remote context registers itself in the RMI registry using a provided key from the environment. The remote event producer for the remote context uses that same key, extended with the string "_producer".- Parameters:
environment- The possibly null environment specifying information to be used in the creation of the initial contextatomicName- the name under which the root context will be registered- Returns:
- A non-null initial context object that implements the ContextInterface
- Throws:
NamingException- when the initial context could not be created
-