2.3 configure
The configure
function block enables you to define the expected incoming and outgoing UDRs for the Java configuration code. MIMs are also published from this function block, where the structure of the MIMs are defined with theĀ defineOutputMIM
command. The UDR interface classes are defined by UDRs that are imported from the ultra configuration.
For details on how to export the UDRs from the ultra format for use in the Java configuration codes, please refer to 1.4 Migrating Java Projects
defineInput()
This command is used to define any one or more expected input UDRs for the Java agent.
Object defineInput(Class);
defineOutput()
This command is used to define any one or more expected output UDRs for the Java agent. Routes can also be defined for outgoing UDRs, associating that specific UDR format to the designated route.
Object defineOutput(String route //Optional, Class);
defineOutputMIM
Publishing MIM's are done with the defineOutputMIM
command. This command is used only in theĀ configure
function block and will not be available in any other blocks. The full description of the command is as follows:
Object defineOutputMIM(String mimName, String Object MIMvaluetype);
Parameter | Description |
---|---|
mimName | The string value name of the MIM to be published. |
MIMValueType | supported data types for the MIM values to be stored in the published MIM. Supported Value Type The following are the value types supported by the command.
|
Example
Example of configure function block.
public void configure(ConfigDefinition cfg) { cfg.defineInput (MainUDR_UDR.class); cfg.defineOutput(byte[].class, UDRInterface.class); cfg.defineOutput(MainUDR_UDR.class); cfg.defineOutput("r_5", MySubUDR_UDR.class); cfg.defineOutputMim("prodName", MIMValueType.STRING); cfg.defineOutputMim("idNum", MIMValueType.INT); cfg.defineOutputMim("prodPrice", MIMValueType.DOUBLE); }