net.rim.device.api.io.messaging
Interface BlockingReceiverDestination

All Superinterfaces:
Destination, ReceiverDestination

public interface BlockingReceiverDestination
extends ReceiverDestination

Facilitates the reception of messages while blocking the thread execution.

Since:
BlackBerry API 6.0.0

Method Summary
 Message receive()
          Returns a Message.
 Message receive(long timeout)
          Returns a Message.
 Message receiveNoWait()
          Returns a Message if one exists.
 
Methods inherited from interface net.rim.device.api.io.messaging.ReceiverDestination
getConfig
 
Methods inherited from interface net.rim.device.api.io.messaging.Destination
destroy, getUri, pause, release, resume
 



Method Detail

receive

Message receive()
                throws MessagingException
Returns a Message. Blocks thread execution until a message is delivered.

Returns:
A message delivered to this destination.
Throws:
MessagingException - If this destination is not an incoming destination.
Since:
BlackBerry API 6.0.0

receive

Message receive(long timeout)
                throws MessagingException
Returns a Message. Blocks thread execution until a message is delivered, or the timeout is reached.

Parameters:
timeout - Maximum amount of time to wait for message to be delivered in milliseconds.
Returns:
Message, if one was delivered within the timeout; otherwise null.
Throws:
MessagingException - If this destination is not an incoming destination.
Since:
BlackBerry API 6.0.0

receiveNoWait

Message receiveNoWait()
                      throws MessagingException
Returns a Message if one exists. Does not block thread execution.

Returns:
A message delivered to this Destination.
Throws:
MessagingException - If this destination is not an incoming destination.
Since:
BlackBerry API 6.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.