|
MediateSignalProcessor
Using the [MediateSignal] custom metadata tag (v1.4.0)
Deprecated MediateSignalProcessor is the Signal version of MediateProcessor. It is used to automatically add listeners to your Signal Beans. Usage:
[MediateSignal] Options: You define which Signal Bean to use by: Bean name. E.g. [MediateSignal(bean="mySignalBeanName")] "bean" is the default property so the above is the same as: [MediateSignal("mySignalBeanName")] Bean type. E.g. [MediateSignal(type="com.foomonger.signals.UpdateBarSignal")] This is useful when subclassing Signals. You can define signalPackages on the processor instance just like eventPackages on SwizConfig. E.g.Processor:<processors:MediateSignalProcessor signalPackages="com.foomonger.signals"/>Metadata:[MediateSignal(type="UpdateBarSignal")] The processor always compares the listener's argument length with the Signal's valueClasses. It will throw an error if the lengths do not match. The processor will also strictly compare the argument types if you set strictArgumentTypes = true. E.g. <processors:MediateSignalProcessor strictArgumentTypes="true"/>You may also use DeluxeSignals and define the priority. E.g. [MediateSignal(bean="myDeluxeSignalBean", priority="2")] |
► Sign in to add a comment