All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.PrintObjectList

java.lang.Object
   |
   +----com.ibm.as400.access.PrintObjectList

public abstract class PrintObjectList
extends Object
implements Serializable
The PrintObjectList class is an abstract base class for the various types of network print object lists.


Method Index

 o addPrintObjectListListener(PrintObjectListListener)
Adds the specified PrintObjectList listener to receive PrintObjectList events from this print object list.
 o addPropertyChangeListener(PropertyChangeListener)
Adds the specified PropertyChange listener to receive PropertyChange events from this print object list.
 o addVetoableChangeListener(VetoableChangeListener)
Adds the specified VetoableChange listener to receive VetoableChange events from this print object list.
 o close()
Closes the list so that objects in the list can be garbage collected.
 o getObject(int)
Returns one object from the list.
 o getObjects()
Returns an enumeration of the PrintObjects in the list.
 o getSystem()
Returns the AS/400 system name.
 o isCompleted()
Checks if a list that was opened asynchronously has completed.
 o openAsynchronously()
Builds the list asynchronously.
 o openSynchronously()
Builds the list synchronously.
 o removePrintObjectListListener(PrintObjectListListener)
Removes the specified PrintObjectList listener so that it no longer receives PrintObjectList events from this print object list.
 o removePropertyChangeListener(PropertyChangeListener)
Removes the specified PropertyChange listener so that it no longer receives PropertyChange events from this print object list.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes the specified VetoableChange listener so that it no longer receives VetoableChange events from this print object list.
 o resetAttributesToRetrieve()
Resets the list of object attributes to retrieve.
 o resetFilter()
Resets the list filter back to default values.
 o setAttributesToRetrieve(int[])
Sets the attributes of the object that should be returned in the list.
 o setSystem(AS400)
Sets the AS/400 system name.
 o size()
Returns the current size of the list.
 o waitForItem(int)
Blocks until the number of requested items are done being built.
 o waitForListToComplete()
Blocks until the list is done being built.

Methods

 o addPrintObjectListListener
 public void addPrintObjectListListener(PrintObjectListListener listener)
Adds the specified PrintObjectList listener to receive PrintObjectList events from this print object list.

Parameters:
listener - The PrintObjectList listener.
See Also:
removePrintObjectListListener
 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener listener)
Adds the specified PropertyChange listener to receive PropertyChange events from this print object list.

Parameters:
listener - The PropertyChange listener.
See Also:
removePropertyChangeListener
 o addVetoableChangeListener
 public void addVetoableChangeListener(VetoableChangeListener listener)
Adds the specified VetoableChange listener to receive VetoableChange events from this print object list.

Parameters:
listener - The VetoableChange listener.
See Also:
removeVetoableChangeListener
 o close
 public void close()
Closes the list so that objects in the list can be garbage collected.

 o getObject
 public PrintObject getObject(int index)
Returns one object from the list.

Parameters:
index - The index of the desired object.
Throws: ArrayIndexOutOfBoundsException
If an invalid index is given.
 o getObjects
 public Enumeration getObjects()
Returns an enumeration of the PrintObjects in the list.

 o getSystem
 public final AS400 getSystem()
Returns the AS/400 system name. This method is primarily provided for visual application builders that support JavaBeans.

Returns:
The AS/400 system on which the objects in the list exist.
 o isCompleted
 public boolean isCompleted() throws AS400Exception, AS400SecurityException, ConnectionDroppedException, ErrorCompletingRequestException, InterruptedException, IOException, RequestNotSupportedException
Checks if a list that was opened asynchronously has completed. If any exception occurred while the list was being retrieved, it will be thrown here.

Returns:
true if the list is completely built; false otherwise.
Throws: AS400Exception
If the AS/400 system returns an error message.
Throws: AS400SecurityException
If a security or authority error occurs.
Throws: ConnectionDroppedException
If the connection is dropped unexpectedly.
Throws: ErrorCompletingRequestException
If an error occurs before the request is completed.
Throws: InterruptedException
If this thread is interrupted.
Throws: IOException
If an error occurs while communicating with the AS/400.
Throws: RequestNotSupportedException
If the requested function is not supported because the AS/400 system is not at the correct level.
 o openAsynchronously
 public void openAsynchronously()
Builds the list asynchronously. This method starts a thread to build the list and then returns. The caller may register listeners to obtain status about the list, or call isCompleted(), waitForItem(), or waitForListToComplete().

 o openSynchronously
 public void openSynchronously() throws AS400Exception, AS400SecurityException, ConnectionDroppedException, ErrorCompletingRequestException, InterruptedException, IOException, RequestNotSupportedException
Builds the list synchronously. This method will not return until the list has been built completely. The caller may then call the getObjects() method to get an enumeration of the list.

Throws: AS400Exception
If the AS/400 system returns an error message.
Throws: AS400SecurityException
If a security or authority error occurs.
Throws: ConnectionDroppedException
If the connection is dropped unexpectedly.
Throws: ErrorCompletingRequestException
If an error occurs before the request is completed.
Throws: InterruptedException
If this thread is interrupted.
Throws: IOException
If an error occurs while communicating with the AS/400.
Throws: RequestNotSupportedException
If the requested function is not supported because the AS/400 system is not at the correct level.
 o removePrintObjectListListener
 public void removePrintObjectListListener(PrintObjectListListener listener)
Removes the specified PrintObjectList listener so that it no longer receives PrintObjectList events from this print object list.

Parameters:
listener - The PrintObjectList listener.
See Also:
addPrintObjectListListener
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener listener)
Removes the specified PropertyChange listener so that it no longer receives PropertyChange events from this print object list.

Parameters:
listener - The PropertyChange listener.
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
 public void removeVetoableChangeListener(VetoableChangeListener listener)
Removes the specified VetoableChange listener so that it no longer receives VetoableChange events from this print object list.

Parameters:
listener - The VetoableChange listener.
See Also:
addVetoableChangeListener
 o resetAttributesToRetrieve
 public void resetAttributesToRetrieve()
Resets the list of object attributes to retrieve.

 o resetFilter
 public void resetFilter()
Resets the list filter back to default values.

 o setAttributesToRetrieve
 public synchronized void setAttributesToRetrieve(int attributes[])
Sets the attributes of the object that should be returned in the list. This method can be used to speed up the listing if only interested in a few attributes for each item in the list.

Parameters:
attributes - An array of attribute IDs that define which object attributes will be retrieved for each item in the list when the list is opened.
See Also:
PrintObject
 o setSystem
 public final void setSystem(AS400 system) throws PropertyVetoException
Sets the AS/400 system name. This method is primarily provided for visual application builders that support JavaBeans. Application programmers should specify the AS/400 system in the constructor for the specific network print object list. For example, SpooledFileList myList = new SpooledFileList(mySystem).

Parameters:
system - The AS/400 system name.
Throws: PropertyVetoException
If the change is vetoed.
 o size
 public synchronized int size()
Returns the current size of the list.

 o waitForItem
 public void waitForItem(int itemNumber) throws AS400Exception, AS400SecurityException, ConnectionDroppedException, ErrorCompletingRequestException, InterruptedException, IOException, RequestNotSupportedException
Blocks until the number of requested items are done being built.

Parameters:
itemNumber - The number of items to wait for before returning. Must be greater than 0;
Throws: AS400Exception
If the AS/400 system returns an error message.
Throws: AS400SecurityException
If a security or authority error occurs.
Throws: ConnectionDroppedException
If the connection is dropped unexpectedly.
Throws: ErrorCompletingRequestException
If an error occurs before the request is completed.
Throws: InterruptedException
If this thread is interrupted.
Throws: IOException
If an error occurs while communicating with the AS/400.
Throws: RequestNotSupportedException
If the requested funtion is not supported because the AS/400 system is not at the correct level.
 o waitForListToComplete
 public void waitForListToComplete() throws AS400Exception, AS400SecurityException, ConnectionDroppedException, ErrorCompletingRequestException, InterruptedException, IOException, RequestNotSupportedException
Blocks until the list is done being built.

Throws: AS400Exception
If the AS/400 system returns an error message.
Throws: AS400SecurityException
If a security or authority error occurs.
Throws: ConnectionDroppedException
If the connection is dropped unexpectedly.
Throws: ErrorCompletingRequestException
If an error occurs before the request is completed.
Throws: InterruptedException
If this thread is interrupted.
Throws: IOException
If an error occurs while communicating with the AS/400.
Throws: RequestNotSupportedException
If the requested function is not supported because the AS/400 system is not at the correct level.

All Packages  Class Hierarchy  This Package  Previous  Next  Index