Class IBMi
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIBMi(PrintStream stream, String host, com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials credentials, int ccsid, boolean secure, boolean doTrace) -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeIASP(String targetIASP) voidclose()voidconnected(com.ibm.as400.access.ConnectionEvent event) voidvoiddisconnected(com.ibm.as400.access.ConnectionEvent event) longvoidexecuteAndProcessQuery(String query, RowProcessor rowProcessor) executeCommand(String command) com.ibm.as400.access.CharConvertercom.ibm.as400.access.Jobintcom.ibm.as400.access.Jobcom.ibm.as400.access.AS400JDBCStatementgetiASP()com.ibm.as400.access.AS400com.ibm.as400.access.AS400JDBCConnectionvoidonConnected(Consumer<com.ibm.as400.access.ConnectionEvent> onConnected) voidonDisconnected(Consumer<com.ibm.as400.access.ConnectionEvent> onDisconnected) longlongvoidwithTempFile(TempFileTask task) Runs aTempFileTaskwith a temporaryIFSFilewhose name is guaranteed to be unique.
-
Field Details
-
SYSBAS
- See Also:
-
-
Constructor Details
-
IBMi
public IBMi(PrintStream stream, String host, com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials credentials, int ccsid, boolean secure, boolean doTrace) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
-
Method Details
-
changeIASP
public void changeIASP(String targetIASP) throws PropertyVetoException, com.ibm.as400.access.AS400SecurityException, IOException, InterruptedException, com.ibm.as400.access.ErrorCompletingRequestException - Throws:
PropertyVetoExceptioncom.ibm.as400.access.AS400SecurityExceptionIOExceptionInterruptedExceptioncom.ibm.as400.access.ErrorCompletingRequestException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
disconnect
public void disconnect() -
onConnected
-
onDisconnected
-
connected
public void connected(com.ibm.as400.access.ConnectionEvent event) - Specified by:
connectedin interfacecom.ibm.as400.access.ConnectionListener
-
disconnected
public void disconnected(com.ibm.as400.access.ConnectionEvent event) - Specified by:
disconnectedin interfacecom.ibm.as400.access.ConnectionListener
-
getCharConverter
public com.ibm.as400.access.CharConverter getCharConverter() -
getConnectionCCSID
public int getConnectionCCSID() -
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.AS400SecurityExceptionSQLExceptioncom.ibm.as400.access.ObjectDoesNotExistExceptionIOExceptionInterruptedExceptioncom.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:
SQLExceptioncom.ibm.as400.access.AS400SecurityExceptioncom.ibm.as400.access.ObjectDoesNotExistExceptionIOExceptionInterruptedExceptioncom.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 queryrowProcessor- a processor that will run a process on each row- Throws:
SQLExceptioncom.ibm.as400.access.AS400SecurityExceptioncom.ibm.as400.access.ObjectDoesNotExistExceptionIOExceptionInterruptedExceptioncom.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:
IOExceptioncom.ibm.as400.access.AS400SecurityExceptioncom.ibm.as400.access.ErrorCompletingRequestExceptionInterruptedException
-
getOSVersion
- Throws:
com.ibm.as400.access.AS400SecurityExceptionIOException
-
getIbmiConnection
public com.ibm.as400.access.AS400 getIbmiConnection() -
withTempFile
Runs aTempFileTaskwith a temporaryIFSFilewhose 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 handlingInterruptedException
-
download
public long download(com.ibm.as400.access.IFSFile from, FilePath to) throws IOException, com.ibm.as400.access.AS400SecurityException, InterruptedException - Throws:
IOExceptioncom.ibm.as400.access.AS400SecurityExceptionInterruptedException
-
upload
public long upload(FilePath from, com.ibm.as400.access.IFSFile to) throws IOException, com.ibm.as400.access.AS400SecurityException, InterruptedException - Throws:
IOExceptioncom.ibm.as400.access.AS400SecurityExceptionInterruptedException
-
upload
public long upload(FilePath from, com.ibm.as400.access.IFSFile to, int ccsid) throws IOException, com.ibm.as400.access.AS400SecurityException, InterruptedException - Throws:
IOExceptioncom.ibm.as400.access.AS400SecurityExceptionInterruptedException
-
getSpooledFileHandler
-