PageRenderTime 63ms CodeModel.GetById 31ms RepoModel.GetById 0ms app.codeStats 0ms

/doc/javapns/notification/ResponsePacket.html

https://bitbucket.org/adri11/dmoda_mobile_daemon
HTML | 339 lines | 276 code | 43 blank | 20 comment | 0 complexity | 27d641628651b350d400cfe6f2df0ed6 MD5 | raw file
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.6.0_29) on Sat Jan 28 10:31:34 EST 2012 -->
  6. <TITLE>
  7. ResponsePacket
  8. </TITLE>
  9. <META NAME="date" CONTENT="2012-01-28">
  10. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
  11. <SCRIPT type="text/javascript">
  12. function windowTitle()
  13. {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="ResponsePacket";
  16. }
  17. }
  18. </SCRIPT>
  19. <NOSCRIPT>
  20. </NOSCRIPT>
  21. </HEAD>
  22. <BODY BGCOLOR="white" onload="windowTitle();">
  23. <HR>
  24. <!-- ========= START OF TOP NAVBAR ======= -->
  25. <A NAME="navbar_top"><!-- --></A>
  26. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  27. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  28. <TR>
  29. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  30. <A NAME="navbar_top_firstrow"><!-- --></A>
  31. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  32. <TR ALIGN="center" VALIGN="top">
  33. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  34. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  35. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  36. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  37. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  38. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  39. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  40. </TR>
  41. </TABLE>
  42. </TD>
  43. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  44. </EM>
  45. </TD>
  46. </TR>
  47. <TR>
  48. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  49. &nbsp;<A HREF="../../javapns/notification/PushNotificationPayload.html" title="class in javapns.notification"><B>PREV CLASS</B></A>&nbsp;
  50. &nbsp;NEXT CLASS</FONT></TD>
  51. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  52. <A HREF="../../index.html?javapns/notification/ResponsePacket.html" target="_top"><B>FRAMES</B></A> &nbsp;
  53. &nbsp;<A HREF="ResponsePacket.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  54. &nbsp;<SCRIPT type="text/javascript">
  55. <!--
  56. if(window==top) {
  57. document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  58. }
  59. //-->
  60. </SCRIPT>
  61. <NOSCRIPT>
  62. <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
  63. </NOSCRIPT>
  64. </FONT></TD>
  65. </TR>
  66. <TR>
  67. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  68. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  69. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  70. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  71. </TR>
  72. </TABLE>
  73. <A NAME="skip-navbar_top"></A>
  74. <!-- ========= END OF TOP NAVBAR ========= -->
  75. <HR>
  76. <!-- ======== START OF CLASS DATA ======== -->
  77. <H2>
  78. <FONT SIZE="-1">
  79. javapns.notification</FONT>
  80. <BR>
  81. Class ResponsePacket</H2>
  82. <PRE>
  83. <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  84. <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>javapns.notification.ResponsePacket</B>
  85. </PRE>
  86. <HR>
  87. <DL>
  88. <DT><PRE>public class <B>ResponsePacket</B><DT>extends <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
  89. </PRE>
  90. <P>
  91. A response packet, as described in Apple's enhanced notification format.
  92. <P>
  93. <P>
  94. <DL>
  95. <DT><B>Author:</B></DT>
  96. <DD>Sylvain Pedneault</DD>
  97. </DL>
  98. <HR>
  99. <P>
  100. <!-- ========== METHOD SUMMARY =========== -->
  101. <A NAME="method_summary"><!-- --></A>
  102. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  103. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  104. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  105. <B>Method Summary</B></FONT></TH>
  106. </TR>
  107. <TR BGCOLOR="white" CLASS="TableRowColor">
  108. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  109. <CODE>&nbsp;int</CODE></FONT></TD>
  110. <TD><CODE><B><A HREF="../../javapns/notification/ResponsePacket.html#getCommand()">getCommand</A></B>()</CODE>
  111. <BR>
  112. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the response's command number.</TD>
  113. </TR>
  114. <TR BGCOLOR="white" CLASS="TableRowColor">
  115. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  116. <CODE>&nbsp;int</CODE></FONT></TD>
  117. <TD><CODE><B><A HREF="../../javapns/notification/ResponsePacket.html#getIdentifier()">getIdentifier</A></B>()</CODE>
  118. <BR>
  119. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the response's identifier, which matches the pushed notification's.</TD>
  120. </TR>
  121. <TR BGCOLOR="white" CLASS="TableRowColor">
  122. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  123. <CODE>&nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
  124. <TD><CODE><B><A HREF="../../javapns/notification/ResponsePacket.html#getMessage()">getMessage</A></B>()</CODE>
  125. <BR>
  126. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a humand-friendly error message, as documented by Apple.</TD>
  127. </TR>
  128. <TR BGCOLOR="white" CLASS="TableRowColor">
  129. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  130. <CODE>&nbsp;int</CODE></FONT></TD>
  131. <TD><CODE><B><A HREF="../../javapns/notification/ResponsePacket.html#getStatus()">getStatus</A></B>()</CODE>
  132. <BR>
  133. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the response's status code <i>(see getMessage() for a human-friendly status message instead)</i>.</TD>
  134. </TR>
  135. <TR BGCOLOR="white" CLASS="TableRowColor">
  136. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  137. <CODE>&nbsp;boolean</CODE></FONT></TD>
  138. <TD><CODE><B><A HREF="../../javapns/notification/ResponsePacket.html#isErrorResponsePacket()">isErrorResponsePacket</A></B>()</CODE>
  139. <BR>
  140. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determine if this packet is an error-response packet.</TD>
  141. </TR>
  142. <TR BGCOLOR="white" CLASS="TableRowColor">
  143. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  144. <CODE>&nbsp;boolean</CODE></FONT></TD>
  145. <TD><CODE><B><A HREF="../../javapns/notification/ResponsePacket.html#isValidErrorMessage()">isValidErrorMessage</A></B>()</CODE>
  146. <BR>
  147. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determine if this packet is a valid error-response packet.</TD>
  148. </TR>
  149. </TABLE>
  150. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  151. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  152. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  153. <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
  154. </TR>
  155. <TR BGCOLOR="white" CLASS="TableRowColor">
  156. <TD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
  157. </TR>
  158. </TABLE>
  159. &nbsp;
  160. <P>
  161. <!-- ============ METHOD DETAIL ========== -->
  162. <A NAME="method_detail"><!-- --></A>
  163. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  164. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  165. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  166. <B>Method Detail</B></FONT></TH>
  167. </TR>
  168. </TABLE>
  169. <A NAME="getCommand()"><!-- --></A><H3>
  170. getCommand</H3>
  171. <PRE>
  172. public int <B>getCommand</B>()</PRE>
  173. <DL>
  174. <DD>Returns the response's command number. It should be 8 for all error responses.
  175. <P>
  176. <DD><DL>
  177. <DT><B>Returns:</B><DD>the response's command number (which should be 8)</DL>
  178. </DD>
  179. </DL>
  180. <HR>
  181. <A NAME="isErrorResponsePacket()"><!-- --></A><H3>
  182. isErrorResponsePacket</H3>
  183. <PRE>
  184. public boolean <B>isErrorResponsePacket</B>()</PRE>
  185. <DL>
  186. <DD>Determine if this packet is an error-response packet.
  187. <P>
  188. <DD><DL>
  189. <DT><B>Returns:</B><DD>true if command number is 8, false otherwise</DL>
  190. </DD>
  191. </DL>
  192. <HR>
  193. <A NAME="getStatus()"><!-- --></A><H3>
  194. getStatus</H3>
  195. <PRE>
  196. public int <B>getStatus</B>()</PRE>
  197. <DL>
  198. <DD>Returns the response's status code <i>(see getMessage() for a human-friendly status message instead)</i>.
  199. <P>
  200. <DD><DL>
  201. <DT><B>Returns:</B><DD>the response's status code</DL>
  202. </DD>
  203. </DL>
  204. <HR>
  205. <A NAME="isValidErrorMessage()"><!-- --></A><H3>
  206. isValidErrorMessage</H3>
  207. <PRE>
  208. public boolean <B>isValidErrorMessage</B>()</PRE>
  209. <DL>
  210. <DD>Determine if this packet is a valid error-response packet.
  211. To be valid, it must be an error-response packet (command number 8) and it must have a non-zero status code.
  212. <P>
  213. <DD><DL>
  214. <DT><B>Returns:</B><DD>true if command number is 8 and status code is not 0, false otherwise</DL>
  215. </DD>
  216. </DL>
  217. <HR>
  218. <A NAME="getIdentifier()"><!-- --></A><H3>
  219. getIdentifier</H3>
  220. <PRE>
  221. public int <B>getIdentifier</B>()</PRE>
  222. <DL>
  223. <DD>Returns the response's identifier, which matches the pushed notification's.
  224. <P>
  225. <DD><DL>
  226. <DT><B>Returns:</B><DD>the response's identifier</DL>
  227. </DD>
  228. </DL>
  229. <HR>
  230. <A NAME="getMessage()"><!-- --></A><H3>
  231. getMessage</H3>
  232. <PRE>
  233. public <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getMessage</B>()</PRE>
  234. <DL>
  235. <DD>Returns a humand-friendly error message, as documented by Apple.
  236. <P>
  237. <DD><DL>
  238. <DT><B>Returns:</B><DD>a humand-friendly error message</DL>
  239. </DD>
  240. </DL>
  241. <!-- ========= END OF CLASS DATA ========= -->
  242. <HR>
  243. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  244. <A NAME="navbar_bottom"><!-- --></A>
  245. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  246. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  247. <TR>
  248. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  249. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  250. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  251. <TR ALIGN="center" VALIGN="top">
  252. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  253. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  254. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  255. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  256. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  257. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  258. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  259. </TR>
  260. </TABLE>
  261. </TD>
  262. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  263. </EM>
  264. </TD>
  265. </TR>
  266. <TR>
  267. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  268. &nbsp;<A HREF="../../javapns/notification/PushNotificationPayload.html" title="class in javapns.notification"><B>PREV CLASS</B></A>&nbsp;
  269. &nbsp;NEXT CLASS</FONT></TD>
  270. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  271. <A HREF="../../index.html?javapns/notification/ResponsePacket.html" target="_top"><B>FRAMES</B></A> &nbsp;
  272. &nbsp;<A HREF="ResponsePacket.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  273. &nbsp;<SCRIPT type="text/javascript">
  274. <!--
  275. if(window==top) {
  276. document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  277. }
  278. //-->
  279. </SCRIPT>
  280. <NOSCRIPT>
  281. <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
  282. </NOSCRIPT>
  283. </FONT></TD>
  284. </TR>
  285. <TR>
  286. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  287. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  288. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  289. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  290. </TR>
  291. </TABLE>
  292. <A NAME="skip-navbar_bottom"></A>
  293. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  294. <HR>
  295. </BODY>
  296. </HTML>