|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.naming.InitialContext
net.sourceforge.sqlunit.test.mock.MockInitialContext
public class MockInitialContext
Overrides the InitialContext to provide an in-memory lookup mechanism instead of network lookup. The only methods overriden are bind() and lookup().
| Field Summary |
|---|
| Fields inherited from class javax.naming.InitialContext |
|---|
defaultInitCtx, gotDefault, myProps |
| Fields inherited from interface javax.naming.Context |
|---|
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES |
| Constructor Summary | |
|---|---|
MockInitialContext()
Default constructor used by the MockInitialContextFactory. |
|
| Method Summary | |
|---|---|
void |
bind(java.lang.String name,
java.lang.Object obj)
Binds an Object into the Context by name. |
java.lang.Object |
lookup(java.lang.String name)
Retrieves an Object from the Context by name. |
| Methods inherited from class javax.naming.InitialContext |
|---|
addToEnvironment, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getDefaultInitCtx, getEnvironment, getNameInNamespace, getNameParser, getNameParser, getURLOrDefaultInitCtx, getURLOrDefaultInitCtx, init, list, list, listBindings, listBindings, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MockInitialContext()
throws javax.naming.NamingException
javax.naming.NamingException - if an error occurs in initialization.| Method Detail |
|---|
public final void bind(java.lang.String name,
java.lang.Object obj)
throws javax.naming.NamingException
bind in interface javax.naming.Contextbind in class javax.naming.InitialContextname - the key to look the Object up by.obj - the Object to bind into the Context.
javax.naming.NamingException - if there is a problem with binding.
public final java.lang.Object lookup(java.lang.String name)
throws javax.naming.NamingException
lookup in interface javax.naming.Contextlookup in class javax.naming.InitialContextname - the name of the Object in the context.
javax.naming.NamingException - if there is a problem with lookup.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||