com.mockobjects.naming
Class MockContext
java.lang.Object
com.mockobjects.MockObject
com.mockobjects.naming.MockContext
- All Implemented Interfaces:
- javax.naming.Context, Verifiable
- Direct Known Subclasses:
- MockDirContext
- public class MockContext
- extends MockObject
- implements javax.naming.Context
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 |
Method Summary |
java.lang.Object |
addToEnvironment(java.lang.String name,
java.lang.Object object)
|
void |
bind(javax.naming.Name aBindName,
java.lang.Object aBindObject)
|
void |
bind(java.lang.String aBindName,
java.lang.Object aBindObject)
|
void |
close()
|
javax.naming.Name |
composeName(javax.naming.Name name,
javax.naming.Name name2)
|
java.lang.String |
composeName(java.lang.String name,
java.lang.String name2)
|
javax.naming.Context |
createSubcontext(javax.naming.Name name)
|
javax.naming.Context |
createSubcontext(java.lang.String name)
|
void |
destroySubcontext(javax.naming.Name name)
|
void |
destroySubcontext(java.lang.String name)
|
java.util.Hashtable |
getEnvironment()
|
java.lang.String |
getNameInNamespace()
|
javax.naming.NameParser |
getNameParser(javax.naming.Name name)
|
javax.naming.NameParser |
getNameParser(java.lang.String name)
|
javax.naming.NamingEnumeration |
list(javax.naming.Name name)
|
javax.naming.NamingEnumeration |
list(java.lang.String name)
|
javax.naming.NamingEnumeration |
listBindings(javax.naming.Name name)
|
javax.naming.NamingEnumeration |
listBindings(java.lang.String name)
|
java.lang.Object |
lookup(javax.naming.Name name)
|
java.lang.Object |
lookup(java.lang.String name)
|
java.lang.Object |
lookupLink(javax.naming.Name name)
|
java.lang.Object |
lookupLink(java.lang.String name)
|
void |
rebind(javax.naming.Name aBindName,
java.lang.Object aBindObject)
|
void |
rebind(java.lang.String aBindName,
java.lang.Object aBindObject)
|
java.lang.Object |
removeFromEnvironment(java.lang.String name)
|
void |
rename(javax.naming.Name name,
javax.naming.Name name2)
|
void |
rename(java.lang.String name,
java.lang.String name2)
|
void |
setExpectedBind(java.lang.String aBindName,
java.lang.Object aBindObject)
|
void |
setExpectedCreateSubContext(java.lang.String name)
|
void |
setExpectedLookupName(java.lang.String aLookupName)
|
void |
setExpectedReBind(java.lang.String aBindName,
java.lang.Object aBindObject)
|
void |
setupAddCreateSubContext(javax.naming.Context aContext)
|
void |
setupAddLookup(java.lang.Object aObjectToReturn)
|
void |
unbind(javax.naming.Name name)
|
void |
unbind(java.lang.String name)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockContext
public MockContext()
setupAddLookup
public void setupAddLookup(java.lang.Object aObjectToReturn)
setExpectedLookupName
public void setExpectedLookupName(java.lang.String aLookupName)
lookup
public java.lang.Object lookup(javax.naming.Name name)
throws javax.naming.NamingException
- Specified by:
lookup
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
lookup
public java.lang.Object lookup(java.lang.String name)
throws javax.naming.NamingException
- Specified by:
lookup
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
bind
public void bind(javax.naming.Name aBindName,
java.lang.Object aBindObject)
throws javax.naming.NamingException
- Specified by:
bind
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
setExpectedBind
public void setExpectedBind(java.lang.String aBindName,
java.lang.Object aBindObject)
setExpectedReBind
public void setExpectedReBind(java.lang.String aBindName,
java.lang.Object aBindObject)
bind
public void bind(java.lang.String aBindName,
java.lang.Object aBindObject)
throws javax.naming.NamingException
- Specified by:
bind
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
rebind
public void rebind(javax.naming.Name aBindName,
java.lang.Object aBindObject)
throws javax.naming.NamingException
- Specified by:
rebind
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
rebind
public void rebind(java.lang.String aBindName,
java.lang.Object aBindObject)
throws javax.naming.NamingException
- Specified by:
rebind
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
unbind
public void unbind(javax.naming.Name name)
throws javax.naming.NamingException
- Specified by:
unbind
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
unbind
public void unbind(java.lang.String name)
throws javax.naming.NamingException
- Specified by:
unbind
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
rename
public void rename(javax.naming.Name name,
javax.naming.Name name2)
throws javax.naming.NamingException
- Specified by:
rename
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
rename
public void rename(java.lang.String name,
java.lang.String name2)
throws javax.naming.NamingException
- Specified by:
rename
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
list
public javax.naming.NamingEnumeration list(javax.naming.Name name)
throws javax.naming.NamingException
- Specified by:
list
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
list
public javax.naming.NamingEnumeration list(java.lang.String name)
throws javax.naming.NamingException
- Specified by:
list
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
listBindings
public javax.naming.NamingEnumeration listBindings(javax.naming.Name name)
throws javax.naming.NamingException
- Specified by:
listBindings
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
listBindings
public javax.naming.NamingEnumeration listBindings(java.lang.String name)
throws javax.naming.NamingException
- Specified by:
listBindings
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
destroySubcontext
public void destroySubcontext(javax.naming.Name name)
throws javax.naming.NamingException
- Specified by:
destroySubcontext
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
destroySubcontext
public void destroySubcontext(java.lang.String name)
throws javax.naming.NamingException
- Specified by:
destroySubcontext
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
createSubcontext
public javax.naming.Context createSubcontext(javax.naming.Name name)
throws javax.naming.NamingException
- Specified by:
createSubcontext
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
setupAddCreateSubContext
public void setupAddCreateSubContext(javax.naming.Context aContext)
setExpectedCreateSubContext
public void setExpectedCreateSubContext(java.lang.String name)
createSubcontext
public javax.naming.Context createSubcontext(java.lang.String name)
throws javax.naming.NamingException
- Specified by:
createSubcontext
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
lookupLink
public java.lang.Object lookupLink(javax.naming.Name name)
throws javax.naming.NamingException
- Specified by:
lookupLink
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
lookupLink
public java.lang.Object lookupLink(java.lang.String name)
throws javax.naming.NamingException
- Specified by:
lookupLink
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
getNameParser
public javax.naming.NameParser getNameParser(javax.naming.Name name)
throws javax.naming.NamingException
- Specified by:
getNameParser
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
getNameParser
public javax.naming.NameParser getNameParser(java.lang.String name)
throws javax.naming.NamingException
- Specified by:
getNameParser
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
composeName
public javax.naming.Name composeName(javax.naming.Name name,
javax.naming.Name name2)
throws javax.naming.NamingException
- Specified by:
composeName
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
composeName
public java.lang.String composeName(java.lang.String name,
java.lang.String name2)
throws javax.naming.NamingException
- Specified by:
composeName
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
addToEnvironment
public java.lang.Object addToEnvironment(java.lang.String name,
java.lang.Object object)
throws javax.naming.NamingException
- Specified by:
addToEnvironment
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
removeFromEnvironment
public java.lang.Object removeFromEnvironment(java.lang.String name)
throws javax.naming.NamingException
- Specified by:
removeFromEnvironment
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
getEnvironment
public java.util.Hashtable getEnvironment()
throws javax.naming.NamingException
- Specified by:
getEnvironment
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
close
public void close()
throws javax.naming.NamingException
- Specified by:
close
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
getNameInNamespace
public java.lang.String getNameInNamespace()
throws javax.naming.NamingException
- Specified by:
getNameInNamespace
in interface javax.naming.Context
- Throws:
javax.naming.NamingException
Copyright © 2002 Mock Objects. All Rights Reserved.