IBM BJ0NJML Integration Guide - Page 170
Writing Custom Handlers
![]() |
View all IBM BJ0NJML manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 170 highlights
Writing Custom Handlers The following tags are available: T CLWORKINGDIR - A directory to change (cd) to on the remote system before the command is run. T CLSSETUPCMD - A setup command to be run before the main command. Use this tag for any environmental setup that must occur on the remote system before the main command is issued. T CLCMDPATTERN - A string that defines the pattern of the command to be run. The format of this pattern is similar to the java.text.MessageFormat class. An example is ls -l {0}, where {0} represents a parameter that is substituted. T CLSUB0 - The value to substitute into positions that are marked by {0} in the CLCMDPATTERN. T CLSUB1- The value to substitute into positions that are marked by {1} in the CLCMDPATTERN. T CLSUBn - The value to substitute into positions that are marked by {n} in the CLCMDPATTERN. A CLSUBn tag must correspond to each substitution position in the CLCMDPATTERN tag. The return byte array representation of an XML document contains the results of the command. The XML document contains tags that correspond to the return value, STDOUT and STDERR. The following tags are available: T CLRETURNCODE - The return code from the remote command. T CLRESPONSEOUT - The data that is returned by the remote command in STDOUT tag. T CLRESPONSEERR - The data that is returned by the remote command in STDERR tag. Writing Custom Handlers To write a custom handler, implement the RouterHandler interface. That interface has the following two methods: getParameter() This method returns a list of properties that the handler needs to send data to the endpoint. T The RouterPropsInfo object represents a property. This method can return a list of RouterPropsInfo objects. T The isCrypto attribute in the RouterPropsInfo object indicates whether to encrypt the property value while storing data. For password properties, the value of this attribute is True. 156 Integration Guide
![](/manual_guide/products/ibm-bj0njml-integration-guide-77e799f/170.png)