com.ibm.as400.access
Class BaseDataQueue
java.lang.Object
|
+--com.ibm.as400.access.BaseDataQueue
- Direct Known Subclasses:
- DataQueue, KeyedDataQueue
- public abstract class BaseDataQueue
- extends java.lang.Object
- implements java.io.Serializable
The BaseDataQueue class represents an AS/400 data queue object.
- See Also:
- Serialized Form
Constructor Summary |
BaseDataQueue()
Constructs a BaseDataQueue object. |
BaseDataQueue(AS400 system,
java.lang.String path)
Constructs a BaseDataQueue object. |
Method Summary |
void |
addDataQueueListener(DataQueueListener listener)
Adds a listener to be notified when a data queue event occurs. |
void |
addObjectListener(ObjectListener listener)
Adds a listener to be notified when an object event occurs. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a listener to be notified when the value of any bound property changes. |
void |
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Adds a listener to be notified when the value of any constrained property changes. |
void |
clear()
Removes all entries from the data queue. |
void |
delete()
Deletes the data queue. |
boolean |
exists()
Checks to see if the data queue exists. |
int |
getCcsid()
Returns the CCSID used for the data in this data queue. |
java.lang.String |
getDescription()
Returns the text description of the data queue. |
boolean |
getForceToAuxiliaryStorage()
Returns a value that indicates if entries are forced to auxiliary storage. |
int |
getMaxEntryLength()
Returns the maximum entry length of the data queue. |
java.lang.String |
getName()
Returns the name of the data queue. |
java.lang.String |
getPath()
Returns the full integrated file system path name of the data queue. |
boolean |
getSaveSenderInformation()
Returns whether sender information is stored with each data queue entry. |
AS400 |
getSystem()
Returns the AS400 object representing the system on which the data queue exists. |
boolean |
isFIFO()
Returns a value that indicates if entries are read in FIFO order. |
void |
refreshAttributes()
Refreshes the attributes of the data queue. |
void |
removeDataQueueListener(DataQueueListener listener)
Removes a data queue listener. |
void |
removeObjectListener(ObjectListener listener)
Removes a object listener. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a property change listener. |
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes a vetoable change listener. |
void |
setCcsid(int ccsid)
Sets the CCSID to use for the data in this data queue. |
void |
setPath(java.lang.String path)
Sets the fully qualified integrated file system path name of the data queue. |
void |
setSystem(AS400 system)
Sets the system on which the data queue exists. |
java.lang.String |
toString()
Returns the String representation of this data queue object. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
BaseDataQueue
public BaseDataQueue()
- Constructs a BaseDataQueue object. The system and path properties will need to be set before using any method requiring a connection to the AS/400.
BaseDataQueue
public BaseDataQueue(AS400 system,
java.lang.String path)
- Constructs a BaseDataQueue object. It uses the specified system and path. Depending on how the AS400 object was constructed, the user may need to be prompted for the system name, user ID, or password when any method requiring a connection to the AS/400 is done.
- Parameters:
system
- The AS/400 system on which the data queue exists.path
- The fully qualified integrated file system path name of the data queue.
addDataQueueListener
public void addDataQueueListener(DataQueueListener listener)
- Adds a listener to be notified when a data queue event occurs.
- Parameters:
listener
- The listener.
addObjectListener
public void addObjectListener(ObjectListener listener)
- Adds a listener to be notified when an object event occurs.
- Parameters:
listener
- The listener.
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
- Adds a listener to be notified when the value of any bound property changes.
- Parameters:
listener
- The listener.
addVetoableChangeListener
public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
- Adds a listener to be notified when the value of any constrained property changes.
- Parameters:
listener
- The listener.
clear
public void clear()
throws AS400SecurityException,
ErrorCompletingRequestException,
java.io.IOException,
IllegalObjectTypeException,
java.lang.InterruptedException,
ObjectDoesNotExistException
- Removes all entries from the data queue.
- Throws:
- AS400SecurityException - If a security or authority error occurs.
- ConnectionDroppedException - If the connection is dropped unexpectedly.
- ErrorCompletingRequestException - If an error occurs before the request is completed.
- java.io.IOException - If an error occurs while communicating with the AS/400.
- IllegalObjectTypeException - If the AS/400 object is not the required type.
- java.lang.InterruptedException - If this thread is interrupted.
- ObjectDoesNotExistException - If the AS/400 object does not exist.
- ServerStartupException - If the AS/400 server cannot be started.
- java.net.UnknownHostException - If the AS/400 system cannot be located.
delete
public void delete()
throws AS400SecurityException,
ErrorCompletingRequestException,
java.io.IOException,
IllegalObjectTypeException,
java.lang.InterruptedException,
ObjectDoesNotExistException
- Deletes the data queue.
- Throws:
- AS400SecurityException - If a security or authority error occurs.
- ConnectionDroppedException - If the connection is dropped unexpectedly.
- ErrorCompletingRequestException - If an error occurs before the request is completed.
- java.io.IOException - If an error occurs while communicating with the AS/400.
- IllegalObjectTypeException - If the AS/400 object is not the required type.
- java.lang.InterruptedException - If this thread is interrupted.
- ObjectDoesNotExistException - If the AS/400 object does not exist.
- ServerStartupException - If the AS/400 server cannot be started.
- java.net.UnknownHostException - If the AS/400 system cannot be located.
exists
public boolean exists()
throws AS400SecurityException,
ErrorCompletingRequestException,
java.io.IOException,
IllegalObjectTypeException,
java.lang.InterruptedException
- Checks to see if the data queue exists.
- Returns:
- true if the data queue exists; false otherwise.
- Throws:
- AS400SecurityException - If a security or authority error occurs.
- ConnectionDroppedException - If the connection is dropped unexpectedly.
- ErrorCompletingRequestException - If an error occurs before the request is completed.
- java.io.IOException - If an error occurs while communicating with the AS/400.
- IllegalObjectTypeException - If the AS/400 object is not the required type.
- java.lang.InterruptedException - If this thread is interrupted.
- ServerStartupException - If the AS/400 server cannot be started.
- java.net.UnknownHostException - If the AS/400 system cannot be located.
getCcsid
public int getCcsid()
- Returns the CCSID used for the data in this data queue.
- Returns:
- The CCSID used for the data in this data queue. If the CCSID has not been set, zero (0) is returned.
getDescription
public java.lang.String getDescription()
throws AS400SecurityException,
ErrorCompletingRequestException,
java.io.IOException,
IllegalObjectTypeException,
java.lang.InterruptedException,
ObjectDoesNotExistException
- Returns the text description of the data queue.
- Returns:
- The text description of the data queue.
- Throws:
- AS400SecurityException - If a security or authority error occurs.
- ConnectionDroppedException - If the connection is dropped unexpectedly.
- ErrorCompletingRequestException - If an error occurs before the request is completed.
- java.io.IOException - If an error occurs while communicating with the AS/400.
- IllegalObjectTypeException - If the AS/400 object is not the required type.
- java.lang.InterruptedException - If this thread is interrupted.
- ObjectDoesNotExistException - If the AS/400 object does not exist.
- ServerStartupException - If the AS/400 server cannot be started.
- java.net.UnknownHostException - If the AS/400 system cannot be located.
getForceToAuxiliaryStorage
public boolean getForceToAuxiliaryStorage()
throws AS400SecurityException,
ErrorCompletingRequestException,
java.io.IOException,
IllegalObjectTypeException,
java.lang.InterruptedException,
ObjectDoesNotExistException
- Returns a value that indicates if entries are forced to auxiliary storage. If true, entries are immediately written to permanent storage. If false, written entries may be kept in memory and could be lost in the case of a power outage.
- Returns:
- true if entries are immediately written to permanent storage; false otherwise.
- Throws:
- AS400SecurityException - If a security or authority error occurs.
- ConnectionDroppedException - If the connection is dropped unexpectedly.
- ErrorCompletingRequestException - If an error occurs before the request is completed.
- java.io.IOException - If an error occurs while communicating with the AS/400.
- IllegalObjectTypeException - If the AS/400 object is not the required type.
- java.lang.InterruptedException - If this thread is interrupted.
- ObjectDoesNotExistException - If the AS/400 object does not exist.
- ServerStartupException - If the AS/400 server cannot be started.
- java.net.UnknownHostException - If the AS/400 system cannot be located.
getMaxEntryLength
public int getMaxEntryLength()
throws AS400SecurityException,
ErrorCompletingRequestException,
java.io.IOException,
IllegalObjectTypeException,
java.lang.InterruptedException,
ObjectDoesNotExistException
- Returns the maximum entry length of the data queue.
- Returns:
- The maximum entry length of the data queue.
- Throws:
- AS400SecurityException - If a security or authority error occurs.
- ConnectionDroppedException - If the connection is dropped unexpectedly.
- ErrorCompletingRequestException - If an error occurs before the request is completed.
- java.io.IOException - If an error occurs while communicating with the AS/400.
- IllegalObjectTypeException - If the AS/400 object is not the required type.
- java.lang.InterruptedException - If this thread is interrupted.
- ObjectDoesNotExistException - If the AS/400 object does not exist.
- ServerStartupException - If the AS/400 server cannot be started.
- java.net.UnknownHostException - If the AS/400 system cannot be located.
getName
public java.lang.String getName()
- Returns the name of the data queue.
- Returns:
- The data queue name, or an empty string ("") if not set.
getPath
public java.lang.String getPath()
- Returns the full integrated file system path name of the data queue.
- Returns:
- The fully-qualified data queue name, or an empty string ("") if not set.
getSaveSenderInformation
public boolean getSaveSenderInformation()
throws AS400SecurityException,
ErrorCompletingRequestException,
java.io.IOException,
IllegalObjectTypeException,
java.lang.InterruptedException,
ObjectDoesNotExistException
- Returns whether sender information is stored with each data queue entry.
- Returns:
- true if sender information is saved; false otherwise.
- Throws:
- AS400SecurityException - If a security or authority error occurs.
- ConnectionDroppedException - If the connection is dropped unexpectedly.
- ErrorCompletingRequestException - If an error occurs before the request is completed.
- java.io.IOException - If an error occurs while communicating with the AS/400.
- IllegalObjectTypeException - If the AS/400 object is not the required type.
- java.lang.InterruptedException - If this thread is interrupted.
- ObjectDoesNotExistException - If the AS/400 object does not exist.
- ServerStartupException - If the AS/400 server cannot be started.
- java.net.UnknownHostException - If the AS/400 system cannot be located.
getSystem
public AS400 getSystem()
- Returns the AS400 object representing the system on which the data queue exists.
- Returns:
- The system on which the data queue exists. If the system has not been set, null is returned.
isFIFO
public boolean isFIFO()
throws AS400SecurityException,
ErrorCompletingRequestException,
java.io.IOException,
IllegalObjectTypeException,
java.lang.InterruptedException,
ObjectDoesNotExistException
- Returns a value that indicates if entries are read in FIFO order. Returns true if entries are read off the data queue in FIFO order. Returns false if entries are read off the data queue in LIFO order.
- Returns:
- true if entries are read off the data queue in FIFO order; false otherwise.
- Throws:
- AS400SecurityException - If a security or authority error occurs.
- ConnectionDroppedException - If the connection is dropped unexpectedly.
- ErrorCompletingRequestException - If an error occurs before the request is completed.
- java.io.IOException - If an error occurs while communicating with the AS/400.
- IllegalObjectTypeException - If the AS/400 object is not the required type.
- java.lang.InterruptedException - If this thread is interrupted.
- ObjectDoesNotExistException - If the AS/400 object does not exist.
- ServerStartupException - If the AS/400 server cannot be started.
- java.net.UnknownHostException - If the AS/400 system cannot be located.
refreshAttributes
public void refreshAttributes()
throws AS400SecurityException,
ErrorCompletingRequestException,
java.io.IOException,
IllegalObjectTypeException,
java.lang.InterruptedException,
ObjectDoesNotExistException
- Refreshes the attributes of the data queue.
- Throws:
- AS400SecurityException - If a security or authority error occurs.
- ConnectionDroppedException - If the connection is dropped unexpectedly.
- ErrorCompletingRequestException - If an error occurs before the request is completed.
- java.io.IOException - If an error occurs while communicating with the AS/400.
- IllegalObjectTypeException - If the AS/400 object is not the required type.
- java.lang.InterruptedException - If this thread is interrupted.
- ObjectDoesNotExistException - If the AS/400 object does not exist.
- ServerStartupException - If the AS/400 server cannot be started.
- java.net.UnknownHostException - If the AS/400 system cannot be located.
removeDataQueueListener
public void removeDataQueueListener(DataQueueListener listener)
- Removes a data queue listener.
- Parameters:
listener
- The listener.
removeObjectListener
public void removeObjectListener(ObjectListener listener)
- Removes a object listener.
- Parameters:
listener
- The listener.
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
- Removes a property change listener.
- Parameters:
listener
- The listener.
removeVetoableChangeListener
public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
- Removes a vetoable change listener.
- Parameters:
listener
- The listener.
setCcsid
public void setCcsid(int ccsid)
throws java.beans.PropertyVetoException
- Sets the CCSID to use for the data in this data queue.
- Parameters:
ccsid
- The CCSID to use for the data in this data queue.- Throws:
- java.beans.PropertyVetoException - If the change is vetoed.
setPath
public void setPath(java.lang.String path)
throws java.beans.PropertyVetoException
- Sets the fully qualified integrated file system path name of the data queue.
- Parameters:
path
- The fully qualified integrated file system path name of the data queue.- Throws:
- java.beans.PropertyVetoException - If the change is vetoed.
setSystem
public void setSystem(AS400 system)
throws java.beans.PropertyVetoException
- Sets the system on which the data queue exists.
- Parameters:
system
- The AS/400 system on which the data queue exists.- Throws:
- java.beans.PropertyVetoException - If the change is vetoed.
toString
public java.lang.String toString()
- Returns the String representation of this data queue object.
- Overrides:
- toString in class java.lang.Object
- Returns:
- The String representation of this data queue object.