Register a model element
The extension point for registering a model element allows the protocol extension to specify:
- A factory class containing instructions to create a model element of a given type.
The factory class must implement the ElementFactory interface from the load test behavior model (LTBM).
- A class that provides test level options to the test for the protocol.
This class should extend the OptionImpl class from the LTBM.
- A type of model element that is handled by this protocol extension.
The element of this type should extend the CBBlockImpl class in the LTBM. The type defaults to the fully qualified name of the model element class. If there are duplicate element types, the element loaded later is ignored and a message is logged in the error log.
Sample
<extension point="com.ibm.rational.test.lt.models.behavior.protocol"> <protocol id="com.ibm.rational.test.lt.example.protocol" factory="com.ibm.rational.test.lt.example.protocol.ProtocolElementFactory" option="com.ibm.rational.test.lt.example.protocol.ProtocolOptions"> <element type="com.ibm.rational.test.lt.example.protocol.XModelElement"/> <element type="com.ibm.rational.test.lt.example.protocol.YModelElement"/> </protocol> </extension>
Related reference
Required attributes in a model class Registration examples