Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Swiz provides four core interfaces to provide additional features or as an alternative to using certain metadata tags.

IInitializing

Implementing this interface will instruct Swiz to invoke the afterPropertiesSet() method of the bean after the bean is set up.

IDisposable

Implementing this interface will instruct Swiz to invoke the destroy() method of the bean when the bean is destroyed

IDispatcherAware

Implementing this interface will instruct Swiz to inject an IEventDispatcher into the bean's dispatcher property when it is set up.

Best Practice

In order to minimize coupling to the Swiz framework, using the [PostConstruct], [PreDestroy] and [Dispatcher] metadata tags should be favored over use of IInitializing, IDisposable and IDispatcherAware.

IBeanFactoryAware

Implementing this interface will instruct Swiz to inject the Swiz IBeanFactory into the bean's beanFactory property when it is set up.

ISwizAware

Implementing this interface will instruct Swiz to inject itself into the bean's swiz property when it is set up.

  • No labels