|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.as400.access.Subsystem
Represents a subsystem on the server.
Most of the getter methods simply return the cached attribute value obtained by the most recent refresh()
.
Other than getObjectDescription(), none of the getters will themselves
go to the system to get the current attribute value. Prior to the first
refresh(), many of the getters will return null or zero.
Example:
Subsystem sbs = new Subsystem(system, library, name); if (!sbs.exists()) { System.out.println("No such subsystem: "+sbs.getPath()); } else { sbs.refresh(); System.out.println("Status: " + sbs.getStatus()); System.out.println("Number of jobs: " + sbs.getCurrentActiveJobs()); System.out.println("Maximum jobs: " + sbs.getMaximumActiveJobs()); SystemPool[] pools = sbs.getPools(); System.out.print("Pools: "); if (pools == null) System.out.println("null"); else for (int i=0; i<pools.length ;="" {="" system.out.print="" ="" +="" (pools[i="=" ?="" null="" :="" pools[i].getname="" }="" system.out.println="" all="" subsystems="" on="" +system.getsystemname="" subsystem="" list="Subsystem.listAllSubsystems(system);" for="" (int="" i=""><list.length ;="" i="" {="" system.out.println(list[i].getlibrary="" +list[i].getname="" }=""></list.length></pools.length>
Field Summary | |
static int |
NO_MAX
Value for the maximumActiveJobs property, indicating "no maximum". |
static int |
NO_TIME_LIMIT
Value for the timeLimit parameter of the end() methods, indicating "no time limit". |
Constructor Summary | |
Subsystem(AS400 system,
String path)
Constructs a Subsystem object. |
|
Subsystem(AS400 system,
String library,
String name)
Constructs a Subsystem object. |
Method Summary | |
void |
assignPool(int sequenceNumber,
int size,
int activityLevel)
Defines a private storage pool and adds it to the list of storage pools defined for the subsystem. |
void |
assignPool(int sequenceNumber,
String poolName)
Adds a shared system pool to the list of storage pools defined for the subsystem. |
void |
changeDescriptionText(String text)
Sets the subsystem description text. |
void |
changeDisplayFilePath(String path)
Specifies the signon display file that is used when showing signon displays at work stations allocated to the subsystem. |
void |
changeLanguageLibrary(String library)
Specifies a library to enter ahead of other libraries in the system portion of the library list. |
void |
changeMaximumActiveJobs(int maxJobs)
Sets the maximum number of active jobs that can run or use resources within the subsystem at one time. |
void |
create()
Creates the subsystem on the server. |
void |
create(String authority)
Creates the subsystem on the server. |
void |
delete()
Deletes the subsystem from the server. |
void |
end(int timeLimit)
Ends the subsystem on the server, in a controlled manner. |
static void |
endAllSubsystems(AS400 system,
int timeLimit)
Ends all active subsystems on the server, in a controlled manner. |
static void |
endAllSubsystemsImmediately(AS400 system)
Ends all active subsystems on the server, immediately. |
void |
endImmediately()
Ends the subsystem on the server, immediately. |
boolean |
equals(Object obj)
Determines whether this Subsystem object is equal to another object. |
boolean |
exists()
Determines if the subsystem currently exists on the system. |
int |
getCurrentActiveJobs()
Returns the number of jobs currently active in the subsystem. |
String |
getDescriptionText()
Returns the subsystem description text. |
String |
getDisplayFilePath()
Returns the path of the signon display file that is used when showing signon displays at work stations allocated to the subsystem. |
String |
getLanguageLibrary()
Returns the library that is entered ahead of other libraries in the system portion of the library list. |
String |
getLibrary()
Returns the name of the library where the subsystem resides on the server. |
int |
getMaximumActiveJobs()
Returns the maximum number of active jobs that can run or use resources within the subsystem at one time. |
Job |
getMonitorJob()
Returns the subsystem monitor job. |
String |
getName()
Returns the subsystem name. |
ObjectDescription |
getObjectDescription()
Returns an ObjectDescription instance representing the subsystem. |
String |
getPath()
Returns the fully-qualifed IFS pathname of the subsystem. |
SystemPool |
getPool(int sequenceNumber)
Returns the storage pool defined at the specified position for the subsystem. |
SystemPool[] |
getPools()
Returns the list of storage pools that are defined for the subsystem. |
String |
getStatus()
Returns the extended status of the subsystem. |
AS400 |
getSystem()
Returns the system where the subsystem resides. |
static Subsystem[] |
listAllSubsystems(AS400 system)
Lists all subsystems on the system. |
void |
refresh()
Refreshes the attributes of this Subsystem object, to reflect the current state of the subsystem on the server. |
void |
removePool(int sequenceNumber)
Removes a storage pool from the list of pools defined for the subsystem. |
void |
start()
Starts the subsystem on the server. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NO_MAX
public static final int NO_TIME_LIMIT
Constructor Detail |
public Subsystem(AS400 system, String library, String name)
system
- The system.library
- The name of the library where the subsystem resides.name
- The simple name of the subsystem.create()
public Subsystem(AS400 system, String path)
system
- The system.path
- The qualified path. For example, "/QSYS.LIB/MYSUBSYS.SBSD".create()
Method Detail |
public void assignPool(int sequenceNumber, String poolName) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
sequenceNumber
- The number of the pool, within the pool list for the subsystem. Valid values are 1-10.poolName
- The name of a shared system storage pool. Valid values include:
*BASE, *NOSTG, *INTERACT, *SPOOL, and *SHRPOOLnn, where nn is an
integer from 1 to 60.
AS400Exception
- If the server returns an error message.
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 server.
ObjectDoesNotExistException
- If the object does not exist on the server.public void assignPool(int sequenceNumber, int size, int activityLevel) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
sequenceNumber
- The number of the pool, within the pool list for the subsystem. Valid values are 1-10.size
- The size of the storage pool, in kilobytes. Must be at least 256 (meaning 256 kilobytes).activityLevel
- The activity level of the pool.
AS400Exception
- If the server returns an error message.
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 server.
ObjectDoesNotExistException
- If the object does not exist on the server.public void changeDescriptionText(String text) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
text
- The subsystem description text. To clear the description, specify "".
AS400Exception
- If the server returns an error message.
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 server.
ObjectDoesNotExistException
- If the object does not exist on the server.public void changeDisplayFilePath(String path) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
path
- The fully qualified pathname of the signon display file. See QSYSObjectPathName.toString()
AS400Exception
- If the server returns an error message.
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 server.
ObjectDoesNotExistException
- If the object does not exist on the server.public void changeLanguageLibrary(String library) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
library
- The name of the
library. Specify "" or "*NONE" to remove the current secondary language
library from the system library list.
AS400Exception
- If the server returns an error message.
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 server.
ObjectDoesNotExistException
- If the object does not exist on the server.public void changeMaximumActiveJobs(int maxJobs) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
maxJobs
- The maximum number of active jobs. Valid values are 0-1000. Special value NO_MAX
is the default, and indicates no maximum.
AS400Exception
- If the server returns an error message.
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 server.
ObjectDoesNotExistException
- If the object does not exist on the server.public void create() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException, ObjectAlreadyExistsException
AS400Exception
- If the server returns an error message.
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 server.
ObjectDoesNotExistException
- If the object does not exist on the server.
ObjectAlreadyExistsException
- If the object already exists on the server.public void create(String authority) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException, ObjectAlreadyExistsException
authority
- The authority
to give to users who do not have specific authority for the object, who
are not on an authorization list, and whose group profile or
supplemental group profiles do not have specific authority for the
object. The default is *LIBCRTAUT. The "base system pool" (*BASE) is
used.
AS400Exception
- If the server returns an error message.
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 server.
ObjectDoesNotExistException
- If the object does not exist on the server.
ObjectAlreadyExistsException
- If the object already exists on the server.public void delete() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException
AS400Exception
- If the server returns an error message.
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 server.public void end(int timeLimit) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
timeLimit
- The amount of
time (in seconds) that is allowed to complete the controlled subsystem
end operation. If this amount of time is exceeded and the end operation
is not complete, any jobs still being processed in the subsystem are
ended immediately. Special value NO_TIME_LIMIT
indicates no time limit.
AS400Exception
- If the server returns an error message.
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 server.
ObjectDoesNotExistException
- If the object does not exist on the server.public static void endAllSubsystems(AS400 system, int timeLimit) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException
system
- The system.timeLimit
- The amount of time (in seconds) that is allowed to complete the
controlled subsystem end operation. If this amount of time is exceeded
and the end operation is not complete, any jobs still being processed
in the subsystem are ended immediately. Special value NO_TIME_LIMIT
indicates no time limit.
AS400Exception
- If the server returns an error message.
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 server.public static void endAllSubsystemsImmediately(AS400 system) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException
system
- The system.
AS400Exception
- If the server returns an error message.
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 server.public void endImmediately() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
AS400Exception
- If the server returns an error message.
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 server.
ObjectDoesNotExistException
- If the object does not exist on the server.public boolean equals(Object obj)
equals
in class Object
public boolean exists() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
AS400Exception
- If the program call returns error messages.
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 server.
ObjectDoesNotExistException
- If the server API (that queries subsystem description information) is missing.public int getCurrentActiveJobs()
public String getDescriptionText()
public String getDisplayFilePath()
public String getLanguageLibrary() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
AS400Exception
- If the server returns an error message.
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 server.
ObjectDoesNotExistException
- If the object does not exist on the server.public String getLibrary()
public int getMaximumActiveJobs()
NO_MAX
if no maximum.public Job getMonitorJob()
public String getName()
public ObjectDescription getObjectDescription()
public String getPath()
public SystemPool getPool(int sequenceNumber)
sequenceNumber
- The number of the pool, within the pool list for the subsystem. Valid values are 1-10.
public SystemPool[] getPools()
public String getStatus()
public AS400 getSystem()
public static Subsystem[] listAllSubsystems(AS400 system) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException, RequestNotSupportedException
AS400Exception
- If the server returns an error message.
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 server.
ObjectDoesNotExistException
- If the object does not exist on the server.
RequestNotSupportedException
- If the requested function is not supported because the server is not at the correct level.public void refresh() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
AS400Exception
- If the server returns an error message.
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 server.
ObjectDoesNotExistException
- If the object does not exist on the server.public void removePool(int sequenceNumber) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
sequenceNumber
- The number of the pool, within the pool list for the subsystem. Valid values are 1-10.
AS400Exception
- If the server returns an error message.
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 server.
ObjectDoesNotExistException
- If the object does not exist on the server.public void start() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
AS400Exception
- If the server returns an error message.
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 server.
ObjectDoesNotExistException
- If the object does not exist on the server.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |