Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 356 | chris | 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_26) on Sun Jan 27 20:37:04 CET 2013 --> |
||
| 6 | <TITLE> |
||
| 7 | Net.HttpResponseListener (libgdx API) |
||
| 8 | </TITLE> |
||
| 9 | |||
| 10 | <META NAME="date" CONTENT="2013-01-27"> |
||
| 11 | |||
| 12 | <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> |
||
| 13 | |||
| 14 | <SCRIPT type="text/javascript"> |
||
| 15 | function windowTitle() |
||
| 16 | { |
||
| 17 | if (location.href.indexOf('is-external=true') == -1) { |
||
| 18 | parent.document.title="Net.HttpResponseListener (libgdx API)"; |
||
| 19 | } |
||
| 20 | } |
||
| 21 | </SCRIPT> |
||
| 22 | <NOSCRIPT> |
||
| 23 | </NOSCRIPT> |
||
| 24 | |||
| 25 | </HEAD> |
||
| 26 | |||
| 27 | <BODY BGCOLOR="white" onload="windowTitle();"> |
||
| 28 | <HR> |
||
| 29 | |||
| 30 | |||
| 31 | <!-- ========= START OF TOP NAVBAR ======= --> |
||
| 32 | <A NAME="navbar_top"><!-- --></A> |
||
| 33 | <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
||
| 34 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
||
| 35 | <TR> |
||
| 36 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
||
| 37 | <A NAME="navbar_top_firstrow"><!-- --></A> |
||
| 38 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
||
| 39 | <TR ALIGN="center" VALIGN="top"> |
||
| 40 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
||
| 41 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
||
| 42 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
||
| 43 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Net.HttpResponseListener.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
||
| 44 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
||
| 45 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
||
| 46 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
||
| 47 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
||
| 48 | </TR> |
||
| 49 | </TABLE> |
||
| 50 | </TD> |
||
| 51 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
||
| 52 | |||
| 53 | libgdx API |
||
| 54 | <style> |
||
| 55 | body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt } |
||
| 56 | pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif } |
||
| 57 | h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold } |
||
| 58 | .TableHeadingColor { background:#EEEEFF; } |
||
| 59 | a { text-decoration:none } |
||
| 60 | a:hover { text-decoration:underline } |
||
| 61 | a:link, a:visited { color:blue } |
||
| 62 | table { border:0px } |
||
| 63 | .TableRowColor td:first-child { border-left:1px solid black } |
||
| 64 | .TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black } |
||
| 65 | hr { border:0px; border-bottom:1px solid #333366; } |
||
| 66 | </style> |
||
| 67 | </EM> |
||
| 68 | </TD> |
||
| 69 | </TR> |
||
| 70 | |||
| 71 | <TR> |
||
| 72 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
||
| 73 | <A HREF="../../../com/badlogic/gdx/Net.HttpResponse.html" title="interface in com.badlogic.gdx"><B>PREV CLASS</B></A> |
||
| 74 | <A HREF="../../../com/badlogic/gdx/Net.HttpStatus.html" title="class in com.badlogic.gdx"><B>NEXT CLASS</B></A></FONT></TD> |
||
| 75 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
||
| 76 | <A HREF="../../../index.html?com/badlogic/gdx/Net.HttpResponseListener.html" target="_top"><B>FRAMES</B></A> |
||
| 77 | <A HREF="Net.HttpResponseListener.html" target="_top"><B>NO FRAMES</B></A> |
||
| 78 | <SCRIPT type="text/javascript"> |
||
| 79 | <!-- |
||
| 80 | if(window==top) { |
||
| 81 | document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
||
| 82 | } |
||
| 83 | //--> |
||
| 84 | </SCRIPT> |
||
| 85 | <NOSCRIPT> |
||
| 86 | <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> |
||
| 87 | </NOSCRIPT> |
||
| 88 | |||
| 89 | |||
| 90 | </FONT></TD> |
||
| 91 | </TR> |
||
| 92 | <TR> |
||
| 93 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
||
| 94 | SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
||
| 95 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
||
| 96 | DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
||
| 97 | </TR> |
||
| 98 | </TABLE> |
||
| 99 | <A NAME="skip-navbar_top"></A> |
||
| 100 | <!-- ========= END OF TOP NAVBAR ========= --> |
||
| 101 | |||
| 102 | <HR> |
||
| 103 | <!-- ======== START OF CLASS DATA ======== --> |
||
| 104 | <H2> |
||
| 105 | <FONT SIZE="-1"> |
||
| 106 | com.badlogic.gdx</FONT> |
||
| 107 | <BR> |
||
| 108 | Interface Net.HttpResponseListener</H2> |
||
| 109 | <DL> |
||
| 110 | <DT><B>Enclosing interface:</B><DD><A HREF="../../../com/badlogic/gdx/Net.html" title="interface in com.badlogic.gdx">Net</A></DD> |
||
| 111 | </DL> |
||
| 112 | <HR> |
||
| 113 | <DL> |
||
| 114 | <DT><PRE>public static interface <B>Net.HttpResponseListener</B></DL> |
||
| 115 | </PRE> |
||
| 116 | |||
| 117 | <P> |
||
| 118 | Listener to be able to do custom logic once the <A HREF="../../../com/badlogic/gdx/Net.HttpResponse.html" title="interface in com.badlogic.gdx"><CODE>Net.HttpResponse</CODE></A> is ready to be processed, register it with |
||
| 119 | <A HREF="../../../com/badlogic/gdx/Net.html#sendHttpRequest(com.badlogic.gdx.Net.HttpRequest, com.badlogic.gdx.Net.HttpResponseListener)"><CODE>Net.sendHttpRequest(HttpRequest, HttpResponseListener)</CODE></A>. |
||
| 120 | <P> |
||
| 121 | |||
| 122 | <P> |
||
| 123 | <HR> |
||
| 124 | |||
| 125 | <P> |
||
| 126 | |||
| 127 | <!-- ========== METHOD SUMMARY =========== --> |
||
| 128 | |||
| 129 | <A NAME="method_summary"><!-- --></A> |
||
| 130 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
||
| 131 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
||
| 132 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
||
| 133 | <B>Method Summary</B></FONT></TH> |
||
| 134 | </TR> |
||
| 135 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
||
| 136 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
||
| 137 | <CODE> void</CODE></FONT></TD> |
||
| 138 | <TD><CODE><B><A HREF="../../../com/badlogic/gdx/Net.HttpResponseListener.html#failed(java.lang.Throwable)">failed</A></B>(java.lang.Throwable t)</CODE> |
||
| 139 | |||
| 140 | <BR> |
||
| 141 | Called if the <A HREF="../../../com/badlogic/gdx/Net.HttpRequest.html" title="class in com.badlogic.gdx"><CODE>Net.HttpRequest</CODE></A> failed because an exception when processing the HTTP request, could be a timeout any |
||
| 142 | other reason (not an HTTP error).</TD> |
||
| 143 | </TR> |
||
| 144 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
||
| 145 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
||
| 146 | <CODE> void</CODE></FONT></TD> |
||
| 147 | <TD><CODE><B><A HREF="../../../com/badlogic/gdx/Net.HttpResponseListener.html#handleHttpResponse(com.badlogic.gdx.Net.HttpResponse)">handleHttpResponse</A></B>(<A HREF="../../../com/badlogic/gdx/Net.HttpResponse.html" title="interface in com.badlogic.gdx">Net.HttpResponse</A> httpResponse)</CODE> |
||
| 148 | |||
| 149 | <BR> |
||
| 150 | Called when the <A HREF="../../../com/badlogic/gdx/Net.HttpRequest.html" title="class in com.badlogic.gdx"><CODE>Net.HttpRequest</CODE></A> has been processed and there is a <A HREF="../../../com/badlogic/gdx/Net.HttpResponse.html" title="interface in com.badlogic.gdx"><CODE>Net.HttpResponse</CODE></A> ready.</TD> |
||
| 151 | </TR> |
||
| 152 | </TABLE> |
||
| 153 | |
||
| 154 | <P> |
||
| 155 | |||
| 156 | <!-- ============ METHOD DETAIL ========== --> |
||
| 157 | |||
| 158 | <A NAME="method_detail"><!-- --></A> |
||
| 159 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
||
| 160 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
||
| 161 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
||
| 162 | <B>Method Detail</B></FONT></TH> |
||
| 163 | </TR> |
||
| 164 | </TABLE> |
||
| 165 | |||
| 166 | <A NAME="handleHttpResponse(com.badlogic.gdx.Net.HttpResponse)"><!-- --></A><H3> |
||
| 167 | handleHttpResponse</H3> |
||
| 168 | <PRE> |
||
| 169 | void <B>handleHttpResponse</B>(<A HREF="../../../com/badlogic/gdx/Net.HttpResponse.html" title="interface in com.badlogic.gdx">Net.HttpResponse</A> httpResponse)</PRE> |
||
| 170 | <DL> |
||
| 171 | <DD>Called when the <A HREF="../../../com/badlogic/gdx/Net.HttpRequest.html" title="class in com.badlogic.gdx"><CODE>Net.HttpRequest</CODE></A> has been processed and there is a <A HREF="../../../com/badlogic/gdx/Net.HttpResponse.html" title="interface in com.badlogic.gdx"><CODE>Net.HttpResponse</CODE></A> ready. <A HREF="../../../com/badlogic/gdx/Net.HttpResponse.html" title="interface in com.badlogic.gdx"><CODE>Net.HttpResponse</CODE></A> |
||
| 172 | contains the <A HREF="../../../com/badlogic/gdx/Net.HttpStatus.html" title="class in com.badlogic.gdx"><CODE>Net.HttpStatus</CODE></A> and should be used to determine if the request was successful or not (see more info at |
||
| 173 | <A HREF="../../../com/badlogic/gdx/Net.HttpStatus.html#getStatusCode()"><CODE>Net.HttpStatus.getStatusCode()</CODE></A>). For example: |
||
| 174 | |||
| 175 | <pre> |
||
| 176 | HttpResponseListener listener = new HttpResponseListener() { |
||
| 177 | public void handleHttpResponse (HttpResponse httpResponse) { |
||
| 178 | HttpStatus status = httpResponse.getStatus(); |
||
| 179 | if (status.getStatusCode() >= 200 && status.getStatusCode() < 300) { |
||
| 180 | // it was successful |
||
| 181 | } else { |
||
| 182 | // do something else |
||
| 183 | } |
||
| 184 | } |
||
| 185 | } |
||
| 186 | </pre> |
||
| 187 | <P> |
||
| 188 | <DD><DL> |
||
| 189 | <DT><B>Parameters:</B><DD><CODE>httpResponse</CODE> - The <A HREF="../../../com/badlogic/gdx/Net.HttpResponse.html" title="interface in com.badlogic.gdx"><CODE>Net.HttpResponse</CODE></A> with the HTTP response values.</DL> |
||
| 190 | </DD> |
||
| 191 | </DL> |
||
| 192 | <HR> |
||
| 193 | |||
| 194 | <A NAME="failed(java.lang.Throwable)"><!-- --></A><H3> |
||
| 195 | failed</H3> |
||
| 196 | <PRE> |
||
| 197 | void <B>failed</B>(java.lang.Throwable t)</PRE> |
||
| 198 | <DL> |
||
| 199 | <DD>Called if the <A HREF="../../../com/badlogic/gdx/Net.HttpRequest.html" title="class in com.badlogic.gdx"><CODE>Net.HttpRequest</CODE></A> failed because an exception when processing the HTTP request, could be a timeout any |
||
| 200 | other reason (not an HTTP error). |
||
| 201 | <P> |
||
| 202 | <DD><DL> |
||
| 203 | <DT><B>Parameters:</B><DD><CODE>t</CODE> - If the HTTP request failed because an Exception, t encapsulates it to give more information.</DL> |
||
| 204 | </DD> |
||
| 205 | </DL> |
||
| 206 | <!-- ========= END OF CLASS DATA ========= --> |
||
| 207 | <HR> |
||
| 208 | |||
| 209 | |||
| 210 | <!-- ======= START OF BOTTOM NAVBAR ====== --> |
||
| 211 | <A NAME="navbar_bottom"><!-- --></A> |
||
| 212 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
||
| 213 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
||
| 214 | <TR> |
||
| 215 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
||
| 216 | <A NAME="navbar_bottom_firstrow"><!-- --></A> |
||
| 217 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
||
| 218 | <TR ALIGN="center" VALIGN="top"> |
||
| 219 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
||
| 220 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
||
| 221 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
||
| 222 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Net.HttpResponseListener.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
||
| 223 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
||
| 224 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
||
| 225 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
||
| 226 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
||
| 227 | </TR> |
||
| 228 | </TABLE> |
||
| 229 | </TD> |
||
| 230 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
||
| 231 | libgdx API</EM> |
||
| 232 | </TD> |
||
| 233 | </TR> |
||
| 234 | |||
| 235 | <TR> |
||
| 236 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
||
| 237 | <A HREF="../../../com/badlogic/gdx/Net.HttpResponse.html" title="interface in com.badlogic.gdx"><B>PREV CLASS</B></A> |
||
| 238 | <A HREF="../../../com/badlogic/gdx/Net.HttpStatus.html" title="class in com.badlogic.gdx"><B>NEXT CLASS</B></A></FONT></TD> |
||
| 239 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
||
| 240 | <A HREF="../../../index.html?com/badlogic/gdx/Net.HttpResponseListener.html" target="_top"><B>FRAMES</B></A> |
||
| 241 | <A HREF="Net.HttpResponseListener.html" target="_top"><B>NO FRAMES</B></A> |
||
| 242 | <SCRIPT type="text/javascript"> |
||
| 243 | <!-- |
||
| 244 | if(window==top) { |
||
| 245 | document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
||
| 246 | } |
||
| 247 | //--> |
||
| 248 | </SCRIPT> |
||
| 249 | <NOSCRIPT> |
||
| 250 | <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> |
||
| 251 | </NOSCRIPT> |
||
| 252 | |||
| 253 | |||
| 254 | </FONT></TD> |
||
| 255 | </TR> |
||
| 256 | <TR> |
||
| 257 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
||
| 258 | SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
||
| 259 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
||
| 260 | DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
||
| 261 | </TR> |
||
| 262 | </TABLE> |
||
| 263 | <A NAME="skip-navbar_bottom"></A> |
||
| 264 | <!-- ======== END OF BOTTOM NAVBAR ======= --> |
||
| 265 | |||
| 266 | <HR> |
||
| 267 | |||
| 268 | <div style="font-size:9pt"><i> |
||
| 269 | Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com) |
||
| 270 | </i></div> |
||
| 271 | |||
| 272 | </BODY> |
||
| 273 | </HTML> |