Writing Custom Handlers - IBM BJ0NJML - Service And Asset Management Integration Manual

Integration guide
Table of Contents

Advertisement

Writing Custom Handlers

Writing Custom Handlers
156
The following tags are available:
CLWORKINGDIR – A directory to change (
the command is run.
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.
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}
substituted.
CLSUB0 - The value to substitute into positions that are marked by {0} in the
CLCMDPATTERN.
CLSUB1- The value to substitute into positions that are marked by {1} in the
CLCMDPATTERN.
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:
CLRETURNCODE – The return code from the remote command.
CLRESPONSEOUT – The data that is returned by the remote command in
STDOUT tag.
CLRESPONSEERR – The data that is returned by the remote command in
STDERR tag.
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.
The RouterPropsInfo object represents a property. This method can
return a list of RouterPropsInfo objects.
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.
cd
) to on the remote system before
, where {0} represents a parameter that is
Integration Guide

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents