java.lang.Object
org.jenkinsci.plugins.ibmisteps.model.IBMi
All Implemented Interfaces:
com.ibm.as400.access.ConnectionListener, Serializable, AutoCloseable, EventListener

public class IBMi extends Object implements com.ibm.as400.access.ConnectionListener, AutoCloseable, Serializable
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • changeIASP

      public void changeIASP(String targetIASP) throws PropertyVetoException, com.ibm.as400.access.AS400SecurityException, IOException, InterruptedException, com.ibm.as400.access.ErrorCompletingRequestException
      Throws:
      PropertyVetoException
      com.ibm.as400.access.AS400SecurityException
      IOException
      InterruptedException
      com.ibm.as400.access.ErrorCompletingRequestException
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • disconnect

      public void disconnect()
    • onConnected

      public void onConnected(Consumer<com.ibm.as400.access.ConnectionEvent> onConnected)
    • onDisconnected

      public void onDisconnected(Consumer<com.ibm.as400.access.ConnectionEvent> onDisconnected)
    • connected

      public void connected(com.ibm.as400.access.ConnectionEvent event)
      Specified by:
      connected in interface com.ibm.as400.access.ConnectionListener
    • disconnected

      public void disconnected(com.ibm.as400.access.ConnectionEvent event)
      Specified by:
      disconnected in interface com.ibm.as400.access.ConnectionListener
    • getCharConverter

      public com.ibm.as400.access.CharConverter getCharConverter()
    • getConnectionCCSID

      public int getConnectionCCSID()
    • getiASP

      public String getiASP()
    • getCommandJob

      public com.ibm.as400.access.Job getCommandJob()
    • getDatabaseJob

      public com.ibm.as400.access.Job getDatabaseJob()
    • getSqlConnection

      public com.ibm.as400.access.AS400JDBCConnection getSqlConnection() throws com.ibm.as400.access.AS400SecurityException, SQLException, com.ibm.as400.access.ObjectDoesNotExistException, IOException, InterruptedException, com.ibm.as400.access.ErrorCompletingRequestException
      Throws:
      com.ibm.as400.access.AS400SecurityException
      SQLException
      com.ibm.as400.access.ObjectDoesNotExistException
      IOException
      InterruptedException
      com.ibm.as400.access.ErrorCompletingRequestException
    • getDB2Statement

      public com.ibm.as400.access.AS400JDBCStatement getDB2Statement() throws SQLException, com.ibm.as400.access.AS400SecurityException, com.ibm.as400.access.ObjectDoesNotExistException, IOException, InterruptedException, com.ibm.as400.access.ErrorCompletingRequestException
      Throws:
      SQLException
      com.ibm.as400.access.AS400SecurityException
      com.ibm.as400.access.ObjectDoesNotExistException
      IOException
      InterruptedException
      com.ibm.as400.access.ErrorCompletingRequestException
    • executeAndProcessQuery

      public void executeAndProcessQuery(String query, RowProcessor rowProcessor) throws SQLException, com.ibm.as400.access.AS400SecurityException, com.ibm.as400.access.ObjectDoesNotExistException, IOException, InterruptedException, com.ibm.as400.access.ErrorCompletingRequestException
      Parameters:
      query - a SQL query
      rowProcessor - a processor that will run a process on each row
      Throws:
      SQLException
      com.ibm.as400.access.AS400SecurityException
      com.ibm.as400.access.ObjectDoesNotExistException
      IOException
      InterruptedException
      com.ibm.as400.access.ErrorCompletingRequestException
    • executeCommand

      public CallResult executeCommand(@CheckForNull String command) throws IOException, com.ibm.as400.access.AS400SecurityException, com.ibm.as400.access.ErrorCompletingRequestException, InterruptedException
      Throws:
      IOException
      com.ibm.as400.access.AS400SecurityException
      com.ibm.as400.access.ErrorCompletingRequestException
      InterruptedException
    • getOSVersion

      public String getOSVersion() throws com.ibm.as400.access.AS400SecurityException, IOException
      Throws:
      com.ibm.as400.access.AS400SecurityException
      IOException
    • getIbmiConnection

      public com.ibm.as400.access.AS400 getIbmiConnection()
    • withTempFile

      public void withTempFile(TempFileTask task) throws IOException, InterruptedException
      Runs a TempFileTask with a temporary IFSFile whose name is guaranteed to be unique.
      Parameters:
      task - the task to run on the temporary file
      Throws:
      IOException - thrown in case of error from the task ar the temp file handling
      InterruptedException
    • download

      public long download(com.ibm.as400.access.IFSFile from, FilePath to) throws IOException, com.ibm.as400.access.AS400SecurityException, InterruptedException
      Throws:
      IOException
      com.ibm.as400.access.AS400SecurityException
      InterruptedException
    • upload

      public long upload(FilePath from, com.ibm.as400.access.IFSFile to) throws IOException, com.ibm.as400.access.AS400SecurityException, InterruptedException
      Throws:
      IOException
      com.ibm.as400.access.AS400SecurityException
      InterruptedException
    • getSpooledFileHandler

      public SpooledFileHandler getSpooledFileHandler()