See Also

IApplicationContextAware Members  | Spring.Context Namespace

Requirements

Namespace: Spring.Context

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Spring.Core (in Spring.Core.dll)

Language

Visual Basic

C#

Show All

See Also Requirements Languages Spring.Core Send comments on this topic.

IApplicationContextAware Interface

Spring.Context Namespace : IApplicationContextAware Interface

To be implemented by any object that wishes to be notified of the IApplicationContext that it runs in.

For a list of all members of this type, see IApplicationContextAware members.

Syntax

[Visual Basic]
Public Interface IApplicationContextAware
[C#]
public interface IApplicationContextAware

Remarks

Implementing this interface makes sense when an object requires access to a set of collaborating objects. Note that configuration via object references is preferable to implementing this interface just for object lookup purposes.

This interface can also be implemented if an object needs access to file resources, i.e. wants to call GetResource, or access to the IMessageSource. However, it is preferable to implement the more specific IResourceLoaderAware interface to receive a reference to the IMessageSource object in that scenario.

Note that IResource dependencies can also be exposed as object properties of the IResource type, populated via strings with automatic type conversion performed by an object factory. This obviates the need for implementing any callback interface just for the purpose of accessing a specific file resource.

ApplicationObjectSupport is a convenience implementation of this interface for your application objects.

For a list of all object lifecycle methods, see the overview for the IObjectFactory interface.

Requirements

Namespace: Spring.Context

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Spring.Core (in Spring.Core.dll)

See Also

IApplicationContextAware Members  | Spring.Context Namespace

 

 


© 2004-2006 Spring.NET Authors. All Rights Reserved.