com.amx.duet.tools.net.http
Interface IHttpPostWrapper


public interface IHttpPostWrapper

Public interface for any class wanting to use the HttpPostWrapper class.

Author:
Cnina

Method Summary
 void handleHttpPostReply(long handle, java.lang.String data, java.net.HttpURLConnection urlConn)
          This callback method will provide the returned/reply data from a successful post request matching the HTTP thread handle.
 void handleHttpPostState(long handle, int state)
          This callback method will provide you with state information for the HTTP thread matching the handle returned.
 

Method Detail

handleHttpPostState

public void handleHttpPostState(long handle,
                                int state)
This callback method will provide you with state information for the HTTP thread matching the handle returned. The state parameters are defined in the HTTPPostWrapper class. The HTTP_POST_SUCCESS state parameter will always be returned after a successful post request/reply has occured and can be used as a message complete indicator.

Parameters:
handle -
state -

handleHttpPostReply

public void handleHttpPostReply(long handle,
                                java.lang.String data,
                                java.net.HttpURLConnection urlConn)
This callback method will provide the returned/reply data from a successful post request matching the HTTP thread handle. This event will trigger before any HTTP_POST_SUCCESS state event.

For simplicity, the data returned from the server is presented as a String. You may extract the same information from within the urlConn object by invoking the getInputStream() method. The urlConn object is returned in order to provide any header field information for the returned data (if needed).

Parameters:
handle -
data -
urlConn -


Copyright © 2008 AMX LLC. All Rights Reserved.