FileDocCategorySizeDatePackage
ConnectionReservation.javaAPI DocphoneME MR2 API (J2ME)2423Wed May 02 18:00:00 BST 2007com.sun.midp.push.gcf

ConnectionReservation

public interface ConnectionReservation
Connection reservation.

Connection reservation is a push enabled protocol connection which is reserved for some application and is managed by the protocol. For details of protocol obligations in respect to reserved connections, see doc for {@link ReservationDescriptor#reserve}.

Fields Summary
Constructors Summary
Methods Summary
public voidcancel()
Cancels reservation.

Cancelling should be guaranteed at least in the following sense: cancelled reservation's callback won't be invoked.

However as callbacks can be invoked from another thread, the following scenario is possible and should be accounted for:

  1. callback is scheduled for execution, but hasn't started yet
  2. cancel method is invoked
  3. callback starts execution

throws
IllegalStateException if invoked after reservation cancellation

public booleanhasAvailableData()
Checks if the reservation has available data.

return
true iff there are available data
throws
IllegalStateException if invoked after reservation cancellation