WebSphere Message Broker, Version 8.0.0.7 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

Using annotations

Annotations alter the behavior of the evaluate method when using the PHP class structure, and remove the need to repeat commonly used code (for transforming message trees) in each PHP script.

When you use the PHP class structure with WebSphere® Message Broker, the class must have the same name as the PHP file and it must implement a method called evaluate. The PHPCompute node instantiates the class and calls the evaluate method. For more information about developing PHP code, see Creating PHP code for a PHPCompute node.

The following annotations are supported by the broker:

You can specify multiple annotations for an evaluate method. If the MessageBrokerCopyTransform and MessageBrokerSimpleTransform annotations are specified together, the MessageBrokerCopyTransform annotation takes precedence. The input assembly is available with both the MessageBrokerSimpleTransform and MessageBrokerCopyTransform annotations.

If no annotations are specified, the first argument to the evaluate method is a read-only assembly. Annotation names are case-sensitive, and annotations that are not recognized are ignored.

When you use an annotation, the output assembly is passed to the evaluate method as the first parameter, and the input assembly is passed as the second parameter. The second parameter is optional and is passed in if you have specified it in your evaluate method declaration.

Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2016Copyright IBM Corporation 1999, 2016.

        
        Last updated:
        
        Last updated: 2016-05-23 14:46:34


Concept topicConcept topic | Version 8.0.0.7 | ac69007_