⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pushregistry.html

📁 J2ME MIDP2.0 final specification
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<DL><DT><B>Since: </B><DD>MIDP 2.0</DD></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/PushRegistry.html#getFilter(java.lang.String)">getFilter</A></B>(String&nbsp;connection)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieve the registered filter for a requested connection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/PushRegistry.html#getMIDlet(java.lang.String)">getMIDlet</A></B>(String&nbsp;connection)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieve the registered <code>MIDlet</code> for a requested connection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;String[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/PushRegistry.html#listConnections(boolean)">listConnections</A></B>(boolean&nbsp;available)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a list of registered connections for the current <code>MIDlet</code> suite.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/PushRegistry.html#registerAlarm(java.lang.String, long)">registerAlarm</A></B>(String&nbsp;midlet,              long&nbsp;time)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Register a time to launch the specified application.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/PushRegistry.html#registerConnection(java.lang.String, java.lang.String, java.lang.String)">registerConnection</A></B>(String&nbsp;connection,                   String&nbsp;midlet,                   String&nbsp;filter)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Register a dynamic connection with the application management software.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/PushRegistry.html#unregisterConnection(java.lang.String)">unregisterConnection</A></B>(String&nbsp;connection)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove a dynamic connection registration.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="registerConnection(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>registerConnection</H3><PRE>public static void <B>registerConnection</B>(String&nbsp;connection,                                      String&nbsp;midlet,                                      String&nbsp;filter)                               throws ClassNotFoundException,                                      java.io.IOException</PRE><DL><DD>Register a dynamic connection with the application management software. Once registered, the dynamic connection acts just like a connection preallocated from the descriptor file. <P> The arguments for the dynamic connection registration are the same as the <A HREF="#PushAttr">Push Registration Attribute</A> used for static registrations. </P> <P> If the <code>connection</code> or <code>filter</code> arguments are <code>null</code>, then an <code>IllegalArgumentException</code> will be thrown. If the <code>midlet</code> argument is <code>null</code> a <code>ClassNotFoundException</code> will be thrown. </P><DD><DL><DT><B>Parameters:</B><DD><CODE>connection</CODE> - generic connection <em>protocol</em>, <em>host</em>              and <em>port number</em>              (optional parameters may be included              separated with semi-colons (;))<DD><CODE>midlet</CODE> - class name of the <code>MIDlet</code> to be launched,              when new external data is available. The named <code>MIDlet</code> MUST be registered in the descriptor file or the jar file manifest with a MIDlet-&lt;n&gt; record. This parameter has the same semantics as the MIDletClassName in the Push registration attribute defined above in the class description.<DD><CODE>filter</CODE> - a connection URL string indicating which senders              are allowed to cause the <code>MIDlet</code> to be launched<DT><B>Throws:</B><DD><CODE>IllegalArgumentException</CODE> - if the connection string is not              valid, or if the filter string is not valid<DD><CODE>ConnectionNotFoundException</CODE> - if the runtime system does not              support push delivery for the requested              connection protocol<DD><CODE>java.io.IOException</CODE> - if the connection is already              registered or if there are insufficient resources              to handle the registration request<DD><CODE>ClassNotFoundException</CODE> - if the <code>MIDlet</code> class name can not be found in the current <code>MIDlet</code> suite or if this class is not included in any of the MIDlet-&lt;n&gt; records in the descriptor file or the jar file manifest<DD><CODE>SecurityException</CODE> - if the <code>MIDlet</code> does not              have permission to register a connection<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/io/PushRegistry.html#unregisterConnection(java.lang.String)"><CODE>unregisterConnection(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="unregisterConnection(java.lang.String)"><!-- --></A><H3>unregisterConnection</H3><PRE>public static boolean <B>unregisterConnection</B>(String&nbsp;connection)</PRE><DL><DD>Remove a dynamic connection registration.<DD><DL><DT><B>Parameters:</B><DD><CODE>connection</CODE> - generic connection <em>protocol</em>,            <em>host</em> and <em>port number</em><DT><B>Returns:</B><DD><code>true</code> if the unregistration was successful,         <code>false</code> if the connection was not registered         or if the connection argument was <code>null</code><DT><B>Throws:</B><DD><CODE>SecurityException</CODE> - if the connection was            registered by another <code>MIDlet</code>            suite<DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/io/PushRegistry.html#registerConnection(java.lang.String, java.lang.String, java.lang.String)"><CODE>registerConnection(java.lang.String, java.lang.String, java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="listConnections(boolean)"><!-- --></A><H3>listConnections</H3><PRE>public static String[] <B>listConnections</B>(boolean&nbsp;available)</PRE><DL><DD>Return a list of registered connections for the current <code>MIDlet</code> suite.<DD><DL><DT><B>Parameters:</B><DD><CODE>available</CODE> - if <code>true</code>, only return the list of     connections with input available, otherwise return the     complete list of registered connections for the current     <code>MIDlet</code> suite<DT><B>Returns:</B><DD>array of registered connection strings, where each connection      is represented by the generic connection <em>protocol</em>,      <em>host</em> and <em>port number</em> identification</DL></DD></DL><HR><A NAME="getMIDlet(java.lang.String)"><!-- --></A><H3>getMIDlet</H3><PRE>public static String <B>getMIDlet</B>(String&nbsp;connection)</PRE><DL><DD>Retrieve the registered <code>MIDlet</code> for a requested connection.<DD><DL><DT><B>Parameters:</B><DD><CODE>connection</CODE> - generic connection <em>protocol</em>, <em>host</em>              and <em>port number</em>              (optional parameters may be included              separated with semi-colons (;))<DT><B>Returns:</B><DD>class name of the <code>MIDlet</code> to be launched,              when new external data is available, or              <code>null</code> if the connection was not              registered by the current <code>MIDlet</code> suite              or if the connection argument was <code>null</code><DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/io/PushRegistry.html#registerConnection(java.lang.String, java.lang.String, java.lang.String)"><CODE>registerConnection(java.lang.String, java.lang.String, java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="getFilter(java.lang.String)"><!-- --></A><H3>getFilter</H3><PRE>public static String <B>getFilter</B>(String&nbsp;connection)</PRE><DL><DD>Retrieve the registered filter for a requested connection.<DD><DL><DT><B>Parameters:</B><DD><CODE>connection</CODE> - generic connection <em>protocol</em>, <em>host</em>              and <em>port number</em>              (optional parameters may be included              separated with semi-colons (;))<DT><B>Returns:</B><DD>a filter string indicating which senders              are allowed to cause the <code>MIDlet</code> to be              launched or <code>null</code>, if the connection was not              registered by the current <code>MIDlet</code> suite              or if the connection argument was <code>null</code><DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/io/PushRegistry.html#registerConnection(java.lang.String, java.lang.String, java.lang.String)"><CODE>registerConnection(java.lang.String, java.lang.String, java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="registerAlarm(java.lang.String, long)"><!-- --></A><H3>registerAlarm</H3><PRE>public static long <B>registerAlarm</B>(String&nbsp;midlet,                                 long&nbsp;time)                          throws ClassNotFoundException,                                 ConnectionNotFoundException</PRE><DL><DD>Register a time to launch the specified application. The <code>PushRegistry</code> supports one outstanding wake up time per <code>MIDlet</code> in the current suite. An application is expected to use a <code>TimerTask</code> for notification of time based events while the application is running. <P>If a wakeup time is already registered, the previous value will be returned, otherwise a zero is returned the first time the alarm is registered. </P><DD><DL><DT><B>Parameters:</B><DD><CODE>midlet</CODE> - class name of the <code>MIDlet</code> within the                current running <code>MIDlet</code> suite                to be launched,                when the alarm time has been reached. The named <code>MIDlet</code> MUST be registered in the descriptor file or the jar file manifest with a MIDlet-&lt;n&gt; record. This parameter has the same semantics as the MIDletClassName in the Push registration attribute defined above in the class description.<DD><CODE>time</CODE> - time at which the <code>MIDlet</code> is to be executed        in the format returned by <code>Date.getTime()</code><DT><B>Returns:</B><DD>the time at which the most recent execution of this        <code>MIDlet</code> was scheduled to occur,        in the format returned by <code>Date.getTime()</code><DT><B>Throws:</B><DD><CODE>ConnectionNotFoundException</CODE> - if the runtime system does not              support alarm based application launch<DD><CODE>ClassNotFoundException</CODE> - if the <code>MIDlet</code> class name can not be found in the current <code>MIDlet</code> suite or if this class is not included in any of the MIDlet-&lt;n&gt; records in the descriptor file or the jar file manifest or if the <code>midlet</code> argument is <code>null</code><DD><CODE>SecurityException</CODE> - if the <code>MIDlet</code> does not              have permission to register an alarm<DT><B>See Also: </B><DD><CODE>Date.getTime()</CODE>, <A HREF="../../../java/util/Timer.html"><CODE>Timer</CODE></A>, <A HREF="../../../java/util/TimerTask.html"><CODE>TimerTask</CODE></A></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/PushRegistry.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><strong>MIDP 2.0</strong></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../javax/microedition/io/Connector.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="PushRegistry.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="mailto:jsr-118-comments@jcp.org">Send a comment or suggestion</a> Version 2.0 of Mobile Information Device Profile Specification<br>Java is a trademark or registered trademark of Sun Microsystems,  Inc. in the US and other countries. Copyright 1993-2002 Sun Microsystems, Inc. and Motorola, Inc. All Rights Reserved. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.</font></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -