Java Reference
In-Depth Information
Table 12-1. Connection Schemes
URL Scheme
Protocol
GCF Connection Type
Defined By
Required
or Optional
btl2cap
L2CAPConnection
Bluetooth
JSR 82
Optional
datagram
DatagramConnection
Datagram
CLDC, CDC, and
Optional
JSR 197 for J2SE
file
FileConnection ,
File system access
JSR 75†
Optional
InputConnection
http
HttpConnection
HTTP
MIDP 1.0,*
Required
MIDP 2.0,**
Foundation Profile,***
and JSR 197 for Java SE
https
HttpsConnection
Secure HTTP
MIDP 2.0**
Required
comm
CommConnection
Serial I/O
MIDP 2.0**
Optional
sms
MessageConnection
SMS
JSR 120, JSR 205
Optional
mms
MessageConnection
MMS
JSR120, JSR 205
Optional
cbs
MessageConnection
Cell Broadcast
JSR 120, JSR 205
Optional
Service (CBS)
apdu
APDUConnection
Application Protocol
JSR 177††
Optional
Data Unit (APDU)
jcrmi
JavaCardRMIConnection
Java Card Remote
JSR 177††
Optional
Method Invocation
socket
SocketConnection
Socket
MIDP 2.0**
Optional
serversocket
ServerSocketConnection
Socket
MIDP 2.0**
Optional
datagram
UDPDatagramConnection
UDP
MIDP 2.0**
Optional
*JSR 37 defines MIDP 1.0.
**JSR 118 defines MIDP 2.0.
***JSR 46 defines Foundation Profile 1.0; JSR 219 defines Foundation Profile 1.1.
†I discuss this in Chapter 7.
††I discuss this in Chapter 15.
From Table 12-1, you can see that not all Java ME platforms support even the most
common connection types. This is something you must keep in mind when designing
your applications. For example, it would do you little good to develop an application that
required the use of UDP datagrams for widespread deployment on legacy handsets that
probably run CLDC MIDP 1.0, because those handsets likely don't provide support for
the UDPDatagramConnection , and even some CLDC MIDP 2.0 handsets lack support for that
class. In general, it's safe to assume support for HTTP on any CLDC or CDC device;
 
Search WWH ::




Custom Search