|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unikassel.android.sdcframework.transmission.AbstractProtocol
de.unikassel.android.sdcframework.transmission.SimpleHttpProtocol
public class SimpleHttpProtocol
Implementation of a simple HTTP protocol without authentication.
Field Summary | |
---|---|
private static String |
IO_EXCEPTION
The IO exception message |
private static String |
PROTOCOL_EXCEPTION
The protocol exception message |
Fields inherited from class de.unikassel.android.sdcframework.transmission.AbstractProtocol |
---|
context, FILE_NOT_FOUND, INVALID_URL, lastError, UNKNOWN_PROTCOL |
Constructor Summary | |
---|---|
SimpleHttpProtocol(Context context,
UUID uuid,
TransmissionProtocolConfiguration config)
Constructor |
Method Summary | |
---|---|
protected void |
configureForAuthentication(DefaultHttpClient client,
URL url)
Method to configure the client for authentication |
protected boolean |
doUploadFile(File file)
Does upload a file according to the concrete protocol |
private String |
getContentType(String fileName)
Method to determine the file type |
private boolean |
httpUpload(File file)
Method for an HTTP upload of file stream |
Methods inherited from class de.unikassel.android.sdcframework.transmission.AbstractProtocol |
---|
doHandleError, getAuthPassword, getContext, getFileName, getHost, getLastError, getMd5Password, getURL, getUserName, getUuid, setFileName, setLastError, setURL, updateConfiguration, uploadFile |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final String IO_EXCEPTION
private static final String PROTOCOL_EXCEPTION
Constructor Detail |
---|
public SimpleHttpProtocol(Context context, UUID uuid, TransmissionProtocolConfiguration config)
context
- the contextuuid
- the unique SDC installation identifier for this deviceconfig
- the current transmission configurationMethod Detail |
---|
private final boolean httpUpload(File file)
file
- the input file
protected void configureForAuthentication(DefaultHttpClient client, URL url)
client
- the default http client instance to configureurl
- the upload urlprivate final String getContentType(String fileName)
fileName
- the file name
protected final boolean doUploadFile(File file)
AbstractProtocol
doUploadFile
in class AbstractProtocol
file
- the file for upload
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |