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 TypeMethodDescriptionvoid
changeIASP
(String targetIASP) void
close()
void
connected
(com.ibm.as400.access.ConnectionEvent event) void
void
disconnected
(com.ibm.as400.access.ConnectionEvent event) long
void
executeAndProcessQuery
(String query, RowProcessor rowProcessor) executeCommand
(String command) com.ibm.as400.access.CharConverter
com.ibm.as400.access.Job
int
com.ibm.as400.access.Job
com.ibm.as400.access.AS400JDBCStatement
getiASP()
com.ibm.as400.access.AS400
com.ibm.as400.access.AS400JDBCConnection
void
onConnected
(Consumer<com.ibm.as400.access.ConnectionEvent> onConnected) void
onDisconnected
(Consumer<com.ibm.as400.access.ConnectionEvent> onDisconnected) long
void
withTempFile
(TempFileTask task) Runs aTempFileTask
with a temporaryIFSFile
whose 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:
IOException
InterruptedException
-
-
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 interfaceAutoCloseable
-
disconnect
public void disconnect() -
onConnected
-
onDisconnected
-
connected
public void connected(com.ibm.as400.access.ConnectionEvent event) - Specified by:
connected
in interfacecom.ibm.as400.access.ConnectionListener
-
disconnected
public void disconnected(com.ibm.as400.access.ConnectionEvent event) - Specified by:
disconnected
in 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.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 queryrowProcessor
- 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
- Throws:
com.ibm.as400.access.AS400SecurityException
IOException
-
getIbmiConnection
public com.ibm.as400.access.AS400 getIbmiConnection() -
withTempFile
Runs aTempFileTask
with a temporaryIFSFile
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 handlingInterruptedException
-
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
-