Serializable
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 | Description |
---|---|---|
static String |
ALL_ASP_SELECTED |
|
static String |
ALL_IASP_SELECTED |
|
static String |
ALL_USER_ASP_SELECTED |
|
static String |
ASP_NUMBER |
Content indicate what kind of ASP or what ASP information is returned.
|
static String |
DATABASE_NAME |
|
static String |
DEVICEDESCRIPTION_NAME |
|
static 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 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 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 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 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 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 String |
RESOURCE_NAME |
|
static String |
UNASSIGNED_DISK |
EMPTY_ERROR_CODE_PARM, system_
Constructor | Description |
---|---|
AspOpenList(AS400 system) |
Constructs a AspOpenList object with the given system.
|
AspOpenList(AS400 system,
String format) |
Constructs a AspOpenList object with the given system.
|
AspOpenList(AS400 system,
String format,
int aspNumber) |
Constructs a AspOpenList object with the given system, format, ASP number.
|
AspOpenList(AS400 system,
String format,
String filterDataType) |
Constructs a AspOpenList object with the given system, format, filter data type.
|
AspOpenList(AS400 system,
String format,
String filterDataType,
String name) |
Constructs a AspOpenList object with the given system, format, filterDataType and ASP name.
|
Modifier and Type | Method | Description |
---|---|---|
protected byte[] |
callOpenListAPI() |
Calls QGY/QYASPOL.
|
protected Object[] |
formatOutputData(byte[] data,
int recordsReturned,
int recordLength) |
Formats the data from QGY/QGYOLSPL.
|
String |
getASPFormat() |
Returns the format currently in use by this open list.
|
String |
getAspName() |
|
int |
getAspNumber() |
|
protected int |
getBestGuessReceiverSize(int number) |
Returns receiver variable size based on format used.
|
String |
getFilterDataType() |
|
int |
getFilterKey() |
|
void |
setASPName(String name) |
Set ASP Name for filter information.
|
void |
setASPNumber(int aspNumber) |
Set ASP number for filter information, filterkey sets to 1.
|
void |
setFilterKey(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(String format) |
Set format of the ASP information being returned.
|
close, finalize, getEnumerationBlockSize, getItems, getItems, getLength, getSystem, isOpen, open, resetHandle, setEnumerationBlockSize
public static final String FORMAT_0100
setFormat(java.lang.String)
,
Constant Field Valuespublic static final String FORMAT_0200
setFormat(java.lang.String)
,
Constant Field Valuespublic static final String FORMAT_0300
setFormat(java.lang.String)
,
Constant Field Valuespublic static final String FORMAT_0400
setFormat(java.lang.String)
,
Constant Field Valuespublic static final String FORMAT_0500
setFormat(java.lang.String)
,
Constant Field Valuespublic static final String FORMAT_0600
setFormat(java.lang.String)
,
Constant Field Valuespublic static final String ASP_NUMBER
setFilterKey(String)
,
Constant Field Valuespublic static final String RESOURCE_NAME
public static final String DEVICEDESCRIPTION_NAME
public static final String DATABASE_NAME
public static final String UNASSIGNED_DISK
public static final String ALL_ASP_SELECTED
public static final String ALL_USER_ASP_SELECTED
public static final 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, 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, String format, 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, 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, String format, String filterDataType, 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, InterruptedException, IOException, ObjectDoesNotExistException
callOpenListAPI
in class OpenList
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.InterruptedException
- If this thread is interrupted.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(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(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(String name)
name
- The ASP name
setFilterKey(String)
public String getASPFormat()
protected Object[] formatOutputData(byte[] data, int recordsReturned, int recordLength) throws AS400SecurityException, ErrorCompletingRequestException, InterruptedException, 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.InterruptedException
- If this thread is interrupted.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 String getAspName()
public int getFilterKey()
public String getFilterDataType()
Copyright © 2024. All rights reserved.