OSID Logo
OSID Specifications
messaging package
Version 3.0.0
Release Candidate Preview
Interfaceosid.messaging.MessageList
Implementsosid.OsidList
Description

Like all OsidLists, MessageList provides a means for accessing Message elements sequentially either one at a time or many at a time. Examples:

                     
                     
                     while (ml.hasNext()) {
                          Message message = ml.getNextMessage();
                     }
                     
                                 
                     
                
or
                     
                     
                     while (ml.hasNext()) {
                          Message[] messages = ml.getNextMessages(ml.available());
                     }
                     
                                 
                     
                
MethodgetNextMessage
Description

Gets the next Message in this list.

Returnosid.messaging.Messagethe next Message in this list. The hasNext() method should be used to test that a next Message is available before calling this method.
ErrorsILLEGAL_STATEno more elements available in this list
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetNextMessages
Description

Gets the next set of Messages in this list which must be less than or equal to the return from available().

Parameterscardinalnthe number of Message elements requested which must be less than or equal to available()
Returnosid.messaging.Message[]an array of Message elements. The length of the array is less than or equal to the number specified.
ErrorsILLEGAL_STATEno more elements available in this list
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.