public class I5Connection extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
borrowed |
protected com.ibm.as400.access.AS400 |
i5 |
protected String |
lastJob |
protected long |
lastUse |
protected sirius.biz.i5.I5ConnectionPool |
pool |
Constructor and Description |
---|
I5Connection() |
Modifier and Type | Method and Description |
---|---|
void |
call(String pgm,
com.ibm.as400.access.ProgramParameter... params)
Calls a program on the i5.
|
boolean |
check()
Checks if the connection is still healthy.
|
void |
close()
Closes the connection by returning it back to the connection pool.
|
String |
getLastJob()
The id of the last job executed on the host
|
String |
getLastUse()
Returns the timestamp of the last usage of this connection.
|
void |
initialize()
Initializes the connection and verifies the installed version of OS400.
|
boolean |
isBorrowed()
Determines if the connection is currently borrowed or not.
|
List<com.ibm.as400.access.DataQueueEntry> |
readQueue(String queue,
int timeoutSeconds)
Reads all entries available in the given queue.
|
void |
release()
Releases / closes the connection.
|
String |
toString() |
protected com.ibm.as400.access.AS400 i5
protected sirius.biz.i5.I5ConnectionPool pool
protected boolean borrowed
protected long lastUse
protected String lastJob
public void release()
public void initialize()
public boolean check()
public void close()
public void call(String pgm, com.ibm.as400.access.ProgramParameter... params)
pgm
- the name of the program to callparams
- the parameters to pass@Nonnull public List<com.ibm.as400.access.DataQueueEntry> readQueue(String queue, int timeoutSeconds) throws Exception
queue
- the name of the queue to readtimeoutSeconds
- the max timeout to wait for entriesException
- in case of a communication or host errorpublic String getLastUse()
public String getLastJob()
public boolean isBorrowed()
Copyright © 2018. All rights reserved.