| java.lang.Object | ||
| ↳ | org.springframework.jndi.JndiTemplate | |
| ↳ | org.springframework.mock.jndi.ExpectedLookupTemplate | |
Simple extension of the JndiTemplate class that always returns a given object. Very useful for testing. Effectively a mock object.
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.jndi.JndiTemplate
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Construct a new JndiTemplate that will always return given objects for
given names.
| |||||||||||
Construct a new JndiTemplate that will always return the given object,
but honour only requests for the given name.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Add the given object to the list of JNDI objects that this template will
expose.
| |||||||||||
If the name is the expected name specified in the constructor, return the
object provided in the constructor.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.jndi.JndiTemplate
| |||||||||||
From class
java.lang.Object
| |||||||||||
Construct a new JndiTemplate that will always return given objects for
given names. To be populated through addObject calls.
Construct a new JndiTemplate that will always return the given object, but honour only requests for the given name.
| name | the name the client is expected to look up |
|---|---|
| object | the object that will be returned |
Add the given object to the list of JNDI objects that this template will expose.
| name | the name the client is expected to look up |
|---|---|
| object | the object that will be returned |
If the name is the expected name specified in the constructor, return the object provided in the constructor. If the name is unexpected, a respective NamingException gets thrown.
| name | the JNDI name of the object |
|---|
null; if a not so well-behaved
JNDI implementations returns null, a NamingException gets thrown)| NamingException |
|---|