public class AspOpenList extends OpenList
OpenList
implementation that generates lists of AspListItem
objects.
AS400 system = new AS400("mySystem", "myUserID", "myPassword"); //Return all ASPs list with format FORMAT_0100(YASP0100) AspOpenList list = new AspOpenList(system); list.open(); Enumeration items = list.getItems(); while (items.hasMoreElements()) { AspListItem item = (AspListItem)items.nextElement(); System.out.println(item.getASPNumber() + "/" + item.getResourceName() + "/" + item.getVersion() + " - " + item.getASPUsage() + ", " + item.getASPStatus()); } list.close();
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALL_ASP_SELECTED |
static java.lang.String |
ALL_IASP_SELECTED |
static java.lang.String |
ALL_USER_ASP_SELECTED |
static java.lang.String |
ASP_NUMBER
Content indicate what kind of ASP or what ASP information is returned.
|
static java.lang.String |
DATABASE_NAME |
static java.lang.String |
DEVICEDESCRIPTION_NAME |
static java.lang.String |
FORMAT_0100
Constant indicating that this list will accept parameters for, and, generate SpooledFileListItem objects in accordance with, the YASP0100 format of the underlying API.
|
static java.lang.String |
FORMAT_0200
Constant indicating that this list will accept parameters for, and, generate SpooledFileListItem objects in accordance with, the YASP0200 format of the underlying API.
|
static java.lang.String |
FORMAT_0300
Constant indicating that this list will accept parameters for, and, generate SpooledFileListItem objects in accordance with, the YASP0300 format of the underlying API.
|
static java.lang.String |
FORMAT_0400
Constant indicating that this list will accept parameters for, and, generate SpooledFileListItem objects in accordance with, the YASP0400 format of the underlying API.
|
static java.lang.String |
FORMAT_0500
Constant indicating that this list will accept parameters for, and, generate SpooledFileListItem objects in accordance with, the YASP0500 format of the underlying API.
|
static java.lang.String |
FORMAT_0600
Constant indicating that this list will accept parameters for, and, generate SpooledFileListItem objects in accordance with, the YASP0600 format of the underlying API.
|
static java.lang.String |
RESOURCE_NAME |
static java.lang.String |
UNASSIGNED_DISK |
EMPTY_ERROR_CODE_PARM, system_
Constructor and Description |
---|
AspOpenList(AS400 system)
Constructs a AspOpenList object with the given system.
|
AspOpenList(AS400 system,
java.lang.String format)
Constructs a AspOpenList object with the given system. this list will generate a list of AspOpenList objects for all ASPs on the system using the format.
|
AspOpenList(AS400 system,
java.lang.String format,
int aspNumber)
Constructs a AspOpenList object with the given system, format, ASP number. this list will generate a list of AspOpenList objects for the ASP Number using the format.
|
AspOpenList(AS400 system,
java.lang.String format,
java.lang.String filterDataType)
Constructs a AspOpenList object with the given system, format, filter data type.
|
AspOpenList(AS400 system,
java.lang.String format,
java.lang.String filterDataType,
java.lang.String name)
Constructs a AspOpenList object with the given system, format, filterDataType and ASP name. this list will generate a list of AspOpenList objects for the ASP name using the format.
|
Modifier and Type | Method and Description |
---|---|
protected byte[] |
callOpenListAPI()
Calls QGY/QYASPOL.
|
protected java.lang.Object[] |
formatOutputData(byte[] data,
int recordsReturned,
int recordLength)
Formats the data from QGY/QGYOLSPL.
|
java.lang.String |
getASPFormat()
Returns the format currently in use by this open list.
|
java.lang.String |
getAspName() |
int |
getAspNumber() |
protected int |
getBestGuessReceiverSize(int number)
Returns receiver variable size based on format used.
|
java.lang.String |
getFilterDataType() |
int |
getFilterKey() |
void |
setASPName(java.lang.String name)
Set ASP Name for filter information.
|
void |
setASPNumber(int aspNumber)
Set ASP number for filter information, filterkey sets to 1.
|
void |
setFilterKey(java.lang.String filterDataType)
Set filter key for the filter information, Possible values are:
1 - When filter data type is
ALL_ASP_SELECTED , ALL_IASP_SELECTED , ALL_USER_ASP_SELECTED , UNASSIGNED_DISK , ASP_NUMBER
2 - When filter data type is RESOURCE_NAME
3 - When filter data type is DEVICEDESCRIPTION_NAME
4 - When filter data type is DATABASE_NAME
|
void |
setFormat(java.lang.String format)
Set format of the ASP information being returned.
|
close, finalize, getEnumerationBlockSize, getItems, getItems, getLength, getSystem, isOpen, open, resetHandle, setEnumerationBlockSize
public static final java.lang.String FORMAT_0100
public static final java.lang.String FORMAT_0200
public static final java.lang.String FORMAT_0300
public static final java.lang.String FORMAT_0400
public static final java.lang.String FORMAT_0500
public static final java.lang.String FORMAT_0600
public static final java.lang.String ASP_NUMBER
setFilterKey(String)
,
Constant Field Valuespublic static final java.lang.String RESOURCE_NAME
public static final java.lang.String DEVICEDESCRIPTION_NAME
public static final java.lang.String DATABASE_NAME
public static final java.lang.String UNASSIGNED_DISK
public static final java.lang.String ALL_ASP_SELECTED
public static final java.lang.String ALL_USER_ASP_SELECTED
public static final java.lang.String ALL_IASP_SELECTED
public AspOpenList(AS400 system)
FORMAT_0100
.system
- The system object representing the system on which the ASP existspublic AspOpenList(AS400 system, java.lang.String format)
system
- The system object representing the system on which the ASP existsformat
- The format of ASP information being returned. Support: YASP0100, YASP0200, YASP0300, YASP0400, YASP0500, YASP0600 and UNASSIGNED_DISKsetFormat(java.lang.String)
public AspOpenList(AS400 system, java.lang.String format, java.lang.String filterDataType)
system
- The system object representing the system on which the ASP existsformat
- The format of ASP information being returned. Possible values are: FORMAT_0100, FORMAT_0200, FORMAT_0300, FORMAT_0400, FORMAT_0500 and FORMAT_0600filterDataType
- Filter data type for filter information. Possible values are: ALL_ASP_SELECTED, ALL_USER_ASP_SELECTED and ALL_IASP_SELECTED.setFormat(java.lang.String)
public AspOpenList(AS400 system, java.lang.String format, int aspNumber)
system
- The system object representing the system on which the ASP existsformat
- The format of ASP information being returned. Possible values are: FORMAT_0100, FORMAT_0200, FORMAT_0300, FORMAT_0400, FORMAT_0500 and FORMAT_0600aspNumber
- the ASP number.setFormat(java.lang.String)
,
setASPNumber(int)
public AspOpenList(AS400 system, java.lang.String format, java.lang.String filterDataType, java.lang.String name)
system
- The system object representing the system on which the ASP existsformat
- The format of ASP information being returned. Possible values are: FORMAT_0100, FORMAT_0200, FORMAT_0300, FORMAT_0400, FORMAT_0500 and FORMAT_0600filterDataType
- The ASP filter data type, Possible values are: RESOURCE_NAME, DEVICE_DESCRIPTION_NAME and DATABASE_NAMEname
- The ASP namesetFormat(java.lang.String)
,
setFilterKey(java.lang.String)
,
setASPName(java.lang.String)
protected byte[] callOpenListAPI() throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
callOpenListAPI
in class OpenList
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the object does not exist on the system.public void setASPNumber(int aspNumber)
aspNumber
- public void setFormat(java.lang.String format)
FORMAT_0100
- YASP0100
FORMAT_0200
- YASP0200
FORMAT_0300
- YASP0300
FORMAT_0400
- YASP0400
FORMAT_0500
- YASP0500
FORMAT_0600
- YASP0600
UNASSIGNED_DISK
- YASP0300 and filter data is 0
format
- public void setFilterKey(java.lang.String filterDataType)
ALL_ASP_SELECTED
, ALL_IASP_SELECTED
, ALL_USER_ASP_SELECTED
, UNASSIGNED_DISK
, ASP_NUMBER
RESOURCE_NAME
DEVICEDESCRIPTION_NAME
DATABASE_NAME
filterDataType
- filter data typepublic void setASPName(java.lang.String name)
name
- The ASP name
setFilterKey(String)
public java.lang.String getASPFormat()
protected java.lang.Object[] formatOutputData(byte[] data, int recordsReturned, int recordLength) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
formatOutputData
in class OpenList
data
- The output data from the receiver variable from the call to the QGYGTLE (Get List Entries) API.recordsReturned
- The number of records returned, as reported in the open list information returned on the call to QGYGTLE.recordLength
- The length of a record, in bytes, as reported in the open list information returned on the call to QGYGTLE.AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the object does not exist on the system.protected int getBestGuessReceiverSize(int number)
getBestGuessReceiverSize
in class OpenList
number
- The number of records in the list on the system. This is useful if the subclass needs to return a receiver size based on how many records are in the list.public int getAspNumber()
public java.lang.String getAspName()
public int getFilterKey()
public java.lang.String getFilterDataType()