|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.aop.scope.DefaultScopedObject
public class DefaultScopedObject
Default implementation of the ScopedObject
interface.
Simply delegates the calls to the underlying
bean factory
(BeanFactory.getBean(String)
/
ConfigurableBeanFactory.destroyScopedBean(String)
).
BeanFactory.getBean(java.lang.String)
,
ConfigurableBeanFactory.destroyScopedBean(java.lang.String)
Constructor Summary | |
---|---|
DefaultScopedObject(ConfigurableBeanFactory beanFactory,
String targetBeanName)
Creates a new instance of the DefaultScopedObject class. |
Method Summary | |
---|---|
Object |
getTargetObject()
Return the current target object behind this scoped object proxy, in its raw form (as stored in the target scope). |
void |
removeFromScope()
Remove this object from its target scope, for example from the backing session. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultScopedObject(ConfigurableBeanFactory beanFactory, String targetBeanName)
DefaultScopedObject
class.
beanFactory
- the ConfigurableBeanFactory
that holds the scoped target objecttargetBeanName
- the name of the target bean
IllegalArgumentException
- if either of the parameters is null
; or
if the targetBeanName
consists wholly of whitespaceMethod Detail |
---|
public Object getTargetObject()
ScopedObject
The raw target object can for example be passed to persistence providers which would not be able to handle the scoped proxy object.
getTargetObject
in interface ScopedObject
public void removeFromScope()
ScopedObject
Note that no further calls may be made to the scoped object afterwards (at least within the current thread, that is, with the exact same target object in the target scope).
removeFromScope
in interface ScopedObject
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |