📄 package-summary.html
字号:
<P> The J2ME configuration supported by this device.</P> <P> For example, "CLDC-1.0."</P> </TD> </TR> <TR> <TD ROWSPAN="1" COLSPAN="1"> <P> <EM>microedition.locale</EM> </P> </TD> <TD ROWSPAN="1" COLSPAN="1"> <P> The name of the current locale on this device.</P> <P> For example, "en-US."</P> </TD> </TR> </TABLE> <H4>HTTP Request Header Example</H4> <P> <EM>User-Agent: Profile/MIDP-2.0 Configuration/CLDC-1.0<BR> Accept-Language: en-US<BR> </EM> </P> <H2>StreamConnection Behavior</H2> <P> All MIDP <code>StreamConnections</code> have one underlying <code>InputStream</code> and one <code>OutputStream</code>. Opening a <code>DataInputStream</code> counts as opening an <code>InputStream</code> and opening a <code>DataOutputStream</code> counts as opening an <code>OutputStream</code>. Trying to open another <code>InputStream</code> or another <code>OutputStream</code> from a <code>StreamConnections</code> causes an <CODE>IOException</CODE>. Trying to open <code>InputStream</code> or <code>OutputStream</code> after they have been closed causes an <CODE>IOException</CODE>. </P> <P>After calling the <code>close</code> method, regardless of open streams, further method calls to connection will result in <code>IOExceptions</code> for those methods that are declared to throw <code>IOExceptions</code>. For the methods that do not throw exceptions, unknown results may be returned. </P> <p> The methods of <code>StreamConnections</code> are not synchronized. The only stream method that can be called safely in another thread is <code>close</code>. When <code>close</code> is invoked on a stream that is excuting in another thread, any pending I/O method MUST throw an <code>InterruptedIOException</code>. In the above case implementations SHOULD try to throw the exception in a timely manner. When all open streams have been closed, and when the <code>StreamConnections</code> is closed, any pending I/O operations MUST be interrupted in a timely manner. </p> <H2>Secure Networking</H2> <p> Since the MIDP 2.0 release additional interfaces are available for secure communication with WWW network services. Secure interfaces are provided by HTTPS and SSL/TLS protocol access over the IP network. Refer to the package documentation of <CODE>javax.microedition.pki</CODE> for the details of certificate profile that applies to secure connections. An <code>HttpsConnection</code> is returned from <code>Connector.open()</code> when an <code>"https://"</code> connection string is accessed. A <code>SecureConnection</code> is returned from <code>Connector.open()</code> when an <code>"ssl://"</code> connection string is accessed.</p> <ul> <li><code>javax.microedition.io.HttpsConnection</code></li> <li><code>javax.microedition.io.SecureConnection</code></li> <li><code>javax.microedition.io.SecurityInfo</code></li> <li><code>javax.microedition.pki.Certificate</code></li> <li><code>javax.microedition.pki.CertificateException</code></li> </ul> <H2>Low Level IP Networking</H2> <P> Since the MIDP 2.0 release, the MIDP specification also includes optional networking support for TCP/IP sockets and UDP/IP datagrams. For each of the following schemes, a host is specified for an outbound connection and the host is omitted for an inbound connection. The host can be a host name, a literal IPv4 address or a literal IPv6 addresss (according to RFC2732 square bracket characters '[' ']' may be used to designate an IPv6 address in URL strings). Implementations MUST be able to parse the URL string and recognize the address format used, but are not required to support all address formats and associated protocols. </P> <P> When the host and port number are both omitted from the <code>socket</code> or <code>datagram</code> connection, the system will allocate an available port. The host and port numbers allocated in this fashion can be discovered using the <code> getLocalAddress</code> and <code>getLocalPort</code> methods. The colon (:) may be omitted when the connection string does not include the port parameter. </P> <P> A <code>SocketConnection</code> is returned from <code>Connector.open()</code> when a <code>"socket://host:port"</code> connection string is accessed. A <code>ServerSocketConnection</code> is returned from <code>Connector.open()</code> when a <code>"socket://:port"</code> connection string is accessed. A <code>UDPDatagramConnection</code> is returned from <code>Connector.open()</code> when a <code>"datagram://host:port"</code> connection string is accessed. </P> <ul> <li><code>javax.microedition.io.SocketConnection</code></li> <li><code>javax.microedition.io.ServerSocketConnection</code></li> <li><code>javax.microedition.io.DatagramConnection</code></li> <li><code>javax.microedition.io.Datagram</code></li> <li><code>javax.microedition.io.UDPDatagramConnection</code></li> </ul> <H2>Push Applications</H2> <P> A <code>PushRegistry</code> is available in the MIDP 2.0 release which provides a MIDlet with a means of registering for network connection events, which may be delivered when the application is not currently running. </P> <ul> <li><code>javax.microedition.io.PushRegistry</code></li> </ul> <H2>Serial Port Communications</H2> <P> A <code>CommConnection</code> is available in the MIDP 2.0 release which provides a MIDlet with a means of registering for network accessing a local serial port as a stream connection. </P> <ul> <li><code>javax.microedition.io.CommConnection</code></li> </ul> <H2>Security of Networking Functions</H2> <p>The security model is found in the package <CODE>javax.microedition.midlet</CODE> and provides a framework that allows APIs and functions to be restricted to MIDlet suites that have been granted permissions either by signing or explicitly by the user. (See <A HREF="../midlet/doc-files/Authorization.html"> Security for MIDlet suites</A> for details about granting specific permissions to a <code>MIDlet</code> suite.) </p> <p>The risks associated with a MIDlet suite's use of the network are related the potential for network abuse and to costs to the device owner since network use may result in charges. MIDP 2.0 provides a security framework in which network functions can be protected and allowed only to those applications that have requested and been granted appropriate permissions. </p> <p> Each protocol is accessed by invoking <CODE>javax.microedition.io.Connector.open</CODE> with a URI including the protocol and arguments. The permissions below allow access to be granted individually to protocols. The functionality of the protocols is specified by subclasses of <CODE>Connection</CODE> interface that defines the syntax of the URI and any protocol specific methods. Devices are NOT REQUIRED to implement every protocol. If a protocol is implemented, the security framework specifies the naming of permissions according to the package and class name of the APIs used to access the protocol extended with the protocol name. The API providing access is <CODE>javax.microedition.io.Connector.open</CODE>. The table below defines the corresponding permissions for the protocols defined within this specification. </P> <TABLE WIDTH=100% BORDER=1 CELLPADDING=4 CELLSPACING=3> <TR VALIGN=TOP> <TH WIDTH=60%> <P>Permission</P> </TH> <TH WIDTH=40%> <P>Protocol</P> </TH> </TR> <TR VALIGN=TOP> <TD> <P><CODE>javax.microedition.io.Connector.http</CODE></P> </TD> <TD> <P><CODE>http</CODE></P> </TD> </TR> <TR VALIGN=TOP> <TD> <P><CODE>javax.microedition.io.Connector.https</CODE></P> </TD> <TD> <P><CODE>https</CODE></P> </TD> </TR> <TR VALIGN=TOP> <TD> <P><CODE>javax.microedition.io.Connector.datagram</CODE></P> </TD> <TD> <P><CODE>datagram</CODE></P> </TD> </TR> <TR VALIGN=TOP> <TD> <P><CODE>javax.microedition.io.Connector.datagramreceiver</CODE></P> </TD> <TD> <P><CODE>datagram server (without host)</CODE></P> </TD> </TR> <TR VALIGN=TOP> <TD> <P><CODE>javax.microedition.io.Connector.socket</CODE></P> </TD> <TD> <P><CODE>socket</CODE></P> </TD> </TR> <TR VALIGN=TOP> <TD> <P><CODE>javax.microedition.io.Connector.serversocket</CODE></P> </TD> <TD> <P><CODE>server socket (without host)</CODE></P> </TD> </TR> <TR VALIGN=TOP> <TD> <P><CODE>javax.microedition.io.Connector.ssl</CODE></P> </TD> <TD> <P><CODE>ssl</CODE></P> </TD> </TR> <TR VALIGN=TOP> <TD> <P><CODE>javax.microedition.io.Connector.comm</CODE></P> </TD> <TD> <P><CODE>comm</CODE></P> </TD> </TR> </TABLE> <H2><A NAME="push">Security of PushRegistry</A></H2> <P>The <CODE>PushRegistry</CODE> is protected using the security framework and permissions. The MIDlet suite must have the <CODE>javax.microedition.io.PushRegistry</CODE> permission to register an alarm based launch, to register dynamically using the <CODE>PushRegistry</CODE>, to make a static registration in the application descriptor and to determine if the user needs to be prompted prior to invoking MIDlet suite in response to a Push connection event or alarm. <A HREF="../midlet/doc-files/Authorization.html#domain"> The protection domain</A> defines the general behavior for user permissions with the interaction modes of "oneshot", "session", and "blanket". For the <CODE>PushRegistry</CODE> and the AMS, launching behavior is specialized: </P> <UL> <LI>Oneshot: The user is prompted before the MIDlet suite is invoked to handle a push event or alarm and for each <CODE>PushRegistry</CODE> request; for example to register an alarm or a connection.</LI> <LI>Session: The user is prompted before the MIDlet suite is invoked to handle a push event or alarm, or before the first <CODE>PushRegistry</CODE> request; for example to register an alarm or a connection. Subsequently, when a MIDlet uses the <CODE>PushRegistry</CODE> the user is not prompted.</LI> <LI>Blanket: The user is prompted only once during installation, before the first time the MIDlet suite is invoked to handle a push event or alarm, or uses the <CODE>PushRegistry</CODE>.</LI> </UL> <P>The push mechanism uses protocols in which the device is acting as the server and connections can be accepted from other elements of the network. To use the push mechanisms the MIDlet suite will need the permission to use the server connection. For example, to register a chat program that can be started via push might use the following attributes in the manifest:</P> <PRE>MIDlet-Push-1: socket://:79, com.sun.example.SampleChat, *MIDlet-Permissions: javax.microedition.io.PushRegistry, javax.microedition.io.Connector.serversocket </PRE>
<P>
<DL>
<DT><B>Since: </B><DD>MIDP 1.0</DD>
</DL>
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<strong>MID Profile</strong></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../java/util/package-summary.html"><B>PREV PACKAGE</B></A>
<A HREF="../../../javax/microedition/lcdui/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="package-summary.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<font size="-1"><a href="mailto:midp-feedback@risc.sps.mot.com">Submit a comment or suggestion</a> Version 2.0 of MID Profile Specification<br>Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright (c) 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road,Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -