com.openindex.openestate.tool.agency.export
Class HttpTransport

java.lang.Object
  extended by com.openindex.openestate.tool.agency.export.AbstractTransport
      extended by com.openindex.openestate.tool.agency.export.HttpTransport

public class HttpTransport
extends AbstractTransport

HttpTransport.
$Id: HttpTransport.java 1829 2012-10-14 14:24:52Z andy $

Author:
Andreas Rudolph

Field Summary
static org.apache.commons.codec.binary.Base64 BASE64
           
static String KEY_HTTP_ANONYMOUS
           
static String KEY_HTTP_MODE
           
static String KEY_HTTP_PASS
           
static String KEY_HTTP_POST_MULTIPART
           
static String KEY_HTTP_POST_MULTIPART_KEY
           
static String KEY_HTTP_URL
           
static String KEY_HTTP_USER
           
static String MODE_POST
           
static String MODE_PUT
           
static String NAME
           
static Charset US_ASCII
           
 
Constructor Summary
HttpTransport()
           
 
Method Summary
 AbstractTransportPanel createSetupPanel()
           
protected  void doSend(org.apache.http.client.HttpClient client, URL url, File file)
           
protected  int doSendAsPost(org.apache.http.client.HttpClient client, URL url, File file, StringBuilder responseMsg, StringBuilder responseTxt)
           
protected  int doSendAsPostMultipart(org.apache.http.client.HttpClient client, URL url, File file, StringBuilder responseMsg, StringBuilder responseTxt)
           
protected  int doSendAsPut(org.apache.http.client.HttpClient client, URL url, File file, StringBuilder responseMsg, StringBuilder responseTxt)
           
 void doTransport(File exportDir, AbstractExport export, AgencyExportSummary summary, ImmoToolTask.Callback callback)
          Einen Transport durchführen.
 String getHttpMode()
           
 String getHttpPass()
           
 String getHttpPostMulitpartKey()
           
 URL getHttpUrl()
           
 String getHttpUser()
           
 String getName()
           
 String[] getResponseProtocols()
           
 String getTitle()
           
 boolean isHttpAnonymous()
           
 boolean isHttpPostMulitpart()
           
 void load(Properties props)
           
 void save(Properties props)
           
 void setHttpAnonymous(boolean val)
           
 void setHttpMode(String val)
           
 void setHttpPass(String val)
           
 void setHttpPostMulitpart(boolean val)
           
 void setHttpPostMulitpartKey(String val)
           
 void setHttpUrl(URL val)
           
 void setHttpUser(String val)
           
 
Methods inherited from class com.openindex.openestate.tool.agency.export.AbstractTransport
cancelTransport, listAvailableTransports
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASE64

public static final org.apache.commons.codec.binary.Base64 BASE64

US_ASCII

public static final Charset US_ASCII

NAME

public static final String NAME
See Also:
Constant Field Values

KEY_HTTP_MODE

public static final String KEY_HTTP_MODE
See Also:
Constant Field Values

KEY_HTTP_URL

public static final String KEY_HTTP_URL
See Also:
Constant Field Values

KEY_HTTP_ANONYMOUS

public static final String KEY_HTTP_ANONYMOUS
See Also:
Constant Field Values

KEY_HTTP_USER

public static final String KEY_HTTP_USER
See Also:
Constant Field Values

KEY_HTTP_PASS

public static final String KEY_HTTP_PASS
See Also:
Constant Field Values

KEY_HTTP_POST_MULTIPART

public static final String KEY_HTTP_POST_MULTIPART
See Also:
Constant Field Values

KEY_HTTP_POST_MULTIPART_KEY

public static final String KEY_HTTP_POST_MULTIPART_KEY
See Also:
Constant Field Values

MODE_POST

public static final String MODE_POST
See Also:
Constant Field Values

MODE_PUT

public static final String MODE_PUT
See Also:
Constant Field Values
Constructor Detail

HttpTransport

public HttpTransport()
Method Detail

createSetupPanel

public AbstractTransportPanel createSetupPanel()
Specified by:
createSetupPanel in class AbstractTransport

doSend

protected void doSend(org.apache.http.client.HttpClient client,
                      URL url,
                      File file)
               throws IOException,
                      URISyntaxException
Throws:
IOException
URISyntaxException

doSendAsPost

protected int doSendAsPost(org.apache.http.client.HttpClient client,
                           URL url,
                           File file,
                           StringBuilder responseMsg,
                           StringBuilder responseTxt)
                    throws IOException,
                           URISyntaxException
Throws:
IOException
URISyntaxException

doSendAsPostMultipart

protected int doSendAsPostMultipart(org.apache.http.client.HttpClient client,
                                    URL url,
                                    File file,
                                    StringBuilder responseMsg,
                                    StringBuilder responseTxt)
                             throws IOException,
                                    URISyntaxException
Throws:
IOException
URISyntaxException

doSendAsPut

protected int doSendAsPut(org.apache.http.client.HttpClient client,
                          URL url,
                          File file,
                          StringBuilder responseMsg,
                          StringBuilder responseTxt)
                   throws IOException,
                          URISyntaxException
Throws:
IOException
URISyntaxException

doTransport

public void doTransport(File exportDir,
                        AbstractExport export,
                        AgencyExportSummary summary,
                        ImmoToolTask.Callback callback)
                 throws AgencyExportException,
                        ImmoToolTaskCancelledException
Description copied from class: AbstractTransport
Einen Transport durchführen.

Specified by:
doTransport in class AbstractTransport
Parameters:
exportDir - temporäres Export-Verzeichnis
export - Export-Objekt
summary - Zusammenfassung des Exportes
callback - Callback-Objekt des ausführenden Tasks
Throws:
AgencyExportException - Fehler beim Transport
ImmoToolTaskCancelledException

getHttpMode

public String getHttpMode()

getHttpPostMulitpartKey

public String getHttpPostMulitpartKey()

getHttpPass

public String getHttpPass()

getHttpUrl

public URL getHttpUrl()

getHttpUser

public String getHttpUser()

getName

public String getName()
Specified by:
getName in class AbstractTransport

getResponseProtocols

public String[] getResponseProtocols()
Overrides:
getResponseProtocols in class AbstractTransport

getTitle

public String getTitle()
Specified by:
getTitle in class AbstractTransport

isHttpAnonymous

public boolean isHttpAnonymous()

isHttpPostMulitpart

public boolean isHttpPostMulitpart()

load

public void load(Properties props)
Overrides:
load in class AbstractTransport

save

public void save(Properties props)
Overrides:
save in class AbstractTransport

setHttpAnonymous

public void setHttpAnonymous(boolean val)

setHttpMode

public void setHttpMode(String val)

setHttpPostMulitpart

public void setHttpPostMulitpart(boolean val)

setHttpPostMulitpartKey

public void setHttpPostMulitpartKey(String val)

setHttpPass

public void setHttpPass(String val)

setHttpUrl

public void setHttpUrl(URL val)

setHttpUser

public void setHttpUser(String val)


Copyright © 2012 OpenEstate. All Rights Reserved.