01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package javax.naming.spi;
19:
20: import java.util.Hashtable;
21: import javax.naming.Context;
22: import javax.naming.NamingException;
23:
24: /**
25: * An implementation of <code>InitialContextFactory</code> creates an initial
26: * context so that the JNDI application can begin to invoke naming operations on
27: * that context. The class implementing this interface should be public and
28: * should also provide a public constructor taking no arguments.
29: */
30: public interface InitialContextFactory {
31:
32: /**
33: * Returns a non-null initial context object on which naming operations can
34: * be invoked. The specified <code>envmt</code> parameter may be null or
35: * may be used to customize the requested <code>Context</code> object. The
36: * implementation may clone or copy the <code>envmt</code> object, but
37: * will not modify the original object.
38: *
39: * @param envmt
40: * the context environment as a <code>Hashtable</code>
41: * @return a non-null initial context object
42: * @throws NamingException
43: * if a naming exception occurs
44: */
45: Context getInitialContext(Hashtable<?, ?> envmt)
46: throws NamingException;
47:
48: }
|