Class AS400Connection

  • All Implemented Interfaces:
    Connection

    public class AS400Connection
    extends ConnectionImpl
    This class encapsulates the RXA library's AS400 Connection related objects
    • Field Detail

      • TYPE

        public static final java.lang.String TYPE
        The connection protocol being used
        See Also:
        Constant Field Values
      • args

        protected java.lang.Object[] args
        To be used in logged messages
    • Constructor Detail

      • AS400Connection

        public AS400Connection​(LogProxy log)
        Parameters:
        log -
    • Method Detail

      • getType

        public java.lang.String getType()
        Return this connection type
        Specified by:
        getType in interface Connection
        Specified by:
        getType in class ConnectionImpl
        Returns:
        String The connection protocol used for this connection. One of: WIN, REXEC, RSH, SSH
      • getEntryResponse

        protected Entry getEntryResponse​(com.ibm.tivoli.remoteaccess.ProgramOutput p)
        Transform the ProgramOutput into an Entry object containing the results
        Parameters:
        p - The ProgramOutput object containing the results from executing the command
        Returns:
        Entry object containing three attributes: command.out, command.error, command.returnCode
      • runAS400Program

        public Entry runAS400Program​(java.lang.String c,
                                     java.lang.String[] args,
                                     java.lang.String delim)
                              throws GeneralCLFCException
        Run the specified command on the target machine
        Parameters:
        c - String containing the command to be executed
        args - command arguments
        delim - command argument delimiter
        Returns:
        Entry containing the results from executing the command. It contains three attributes: command.out, command.error and command.returnCode.
        Throws:
        GeneralCLFCException
      • transferFile

        public void transferFile​(java.lang.String localPath,
                                 java.lang.String remotePath)
                          throws GeneralCLFCException
        Transfer the specified file from the local machine to a specified destination on the remote target
        Specified by:
        transferFile in interface Connection
        Overrides:
        transferFile in class ConnectionImpl
        Parameters:
        localPath - Path to the source file on the local machine
        remotePath - Path to where the file is to be stored on the remote machine
        Throws:
        GeneralCLFCException - if the transfer fails