Skip to content

Infrastructure Components

Erik Sundin edited this page Jan 25, 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.

These are the infrastructure components recognised by Typhoon:

###TyphoonComponentFactoryPostProcessor

This component is a post processor of the TyphoonComponentFactory. It can be used to mutate the TyphoonDefinition's registered with the container.

###TyphoonComponentPostProcessor

This component has the ability to process components after they have been instantiated by the container.

###TyphoonTypeConverter

The type converter, as described in Configuration-Management-&-Testing, is also an infrastructure component. When defined it will be picked up and registered automatically.

Ordering post processors

Using the TyphoonOrdered protocol the order in which the TyphoonComponentFactoryPostProcessor and TyphoonComponentPostProcessor can be controlled. Any post processors registered will be sorted before applied.