Skip to content

Infrastructure Components

Erik Sundin edited this page Apr 29, 2014 · 7 revisions

#What is an Infrastructure Component?

Infrastructure components are special in the sense that they, if defined, are recognised automatically by the container. These components have a special meaning and purpose in Typhoon and will be picked up and registered separately from your application components.

The current infrastructure components recognised by Typhoon are:

###TyphoonComponentFactoryPostProcessor

Use this if you want to process all the component definitions in the factory after it has been loaded. It can be useful if you for some reason want to mutate the TyphoonDefinition's registered with the container.

The TyphoonPropertyPlaceholderConfigurer is an example of a TyphoonComponentPostProcessor.

###TyphoonComponentPostProcessor

Use this if you want to process a component after it has been instantiated by the container.

Ordering post processors

The above post processors supports being ordered if needed. In order for your implementation to be ordered implement the TyphoonOrdered protocol. Any post processors registered will be sorted before applied.

###TyphoonTypeConverter

The type converter is also an infrastructure component. When defined it will be picked up and registered automatically as described here.