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

ReservationDescriptor

public interface ReservationDescriptor
Protocol-dependent representation of connection which could become a reservation later.

The instance of this class are expected to be just data holders (see probable additional requirements below).

see
ConnectionReservation
see
ReservationDescriptorFactory

Fields Summary
Constructors Summary
Methods Summary
public java.lang.StringgetConnectionName()
Gets connection name of descriptor.

Should be identical to one passed into {@link ReservationDescriptorFactory#getDescriptor}.

return
connection name

public java.lang.StringgetFilter()
Gets filter of descriptor.

Should be identical to one passed into {@link ReservationDescriptorFactory#getDescriptor}.

return
connection filter

public ConnectionReservationreserve(int midletSuiteId, java.lang.String midletClassName, DataAvailableListener dataAvailableListener)
Reserves the connection.

The very moment this method returns, the correspondong connection cannot be opened by any other application (including native ones) until reservation is cancelled. The connection cannot be reserved by any application (including one for which it has been reserved). IOException should be thrown to report such a situation.

Pair midletSuiteId and midletClassName should refer to valid MIDlet

param
midletSuiteId MIDlet suite ID
param
midletClassName name of MIDlet class
param
dataAvailableListener data availability listener
return
connection reservation
throws
IOException if connection cannot be reserved for the given application