程序包 infra.aop.scope

接口 ScopedObject

所有超级接口:
RawTargetAccess
所有已知实现类:
DefaultScopedObject

public interface ScopedObject extends RawTargetAccess
An AOP introduction interface for scoped objects.

Objects created from the ScopedProxyFactoryBean can be cast to this interface, enabling access to the raw target object and programmatic removal of the target object.

从以下版本开始:
4.0
作者:
Rod Johnson, Juergen Hoeller
另请参阅:
  • 方法概要

    修饰符和类型
    方法
    说明
    Return the current target object behind this scoped object proxy, in its raw form (as stored in the target scope).
    void
    Remove this object from its target scope, for example from the backing session.
  • 方法详细资料

    • getTargetObject

      Object getTargetObject()
      Return the current target object behind this scoped object proxy, in its raw form (as stored in the target scope).

      The raw target object can for example be passed to persistence providers which would not be able to handle the scoped proxy object.

      返回:
      the current target object behind this scoped object proxy
    • removeFromScope

      void removeFromScope()
      Remove this object from its target scope, for example from the backing session.

      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).