OSID Logo
OSID Specifications
messaging package
Version 3.1.0
Interfaceosid.messaging.MessageList
Implementsosid.OsidList
Used Byosid.messaging.MessageLookupSession
osid.messaging.MessageMailboxSession
osid.messaging.MessageQuerySession
osid.messaging.MessageSearchResults
osid.messaging.MessagingSession
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.Message the next Message in this list. The hasNext() method should be used to test that a next Message is available before calling this method.
ErrorsILLEGAL_STATE no more elements available in this list
OPERATION_FAILED unable to complete request
Compliancemandatory This 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().

Parameterscardinaln the 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_STATE no more elements available in this list
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.