Android Open Source - transloadit-Android-sdk I Api Request






From Project

Back to project page transloadit-Android-sdk.

License

The source code is released under:

MIT License

If you think the Android project transloadit-Android-sdk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package hu.szabot.transloadit;
//  w w  w .jav  a 2 s . c o m
import hu.szabot.transloadit.parser.IRequestParser;

import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

/**General interface for accessing REST API service*/
public interface IApiRequest<T extends IApiResponse>
{
  /**The type of request*/
  public enum RequestMethod
    {

        /**Used for GET requests*/
        GET,

        /** Used for POST requests*/
        POST,

        /**Used for PUT requests*/
        PUT,

        /**Used for DELETE requests*/
        DELETE,

    }
  
    /**Gets data to be posted*/
    public ApiData getData();

    /**Gets the method of the current request*/
    public RequestMethod getMethod();
    
    /**Sets the method of the current request*/
    public void setMethod(RequestMethod method);

    /**Gets the URI of the current request*/
    public URI getURI();
    
    /**
     *  Sets the absolute path of the current request
     * @param path The path string
     * @throws URISyntaxException Thrown if the URI is not valid with the given path
     */
    public void setPath(String path) throws URISyntaxException;

    /**
     * Sets the host of the current request
     * @param path The host string
     * @throws URISyntaxException Thrown if the URI is not valid with the given host
     */
    public void setHost(String path) throws URISyntaxException;
    
    /**Sets data to be posted*/
    public void setData(ApiData data);
    
    /**Gets the Request parser object*/
    public IRequestParser getParser();
  
    
    /**
     * Executes the current requests and gets the result
     * @return The response object
     * @throws IOException Thrown when I/O error occurred in the communication.
     */
    public T execute() throws IOException;
}




Java Source Code List

hu.szabot.transloadit.ApiData.java
hu.szabot.transloadit.IApiRequest.java
hu.szabot.transloadit.IApiResponse.java
hu.szabot.transloadit.ITransloadit.java
hu.szabot.transloadit.TransloaditRequest.java
hu.szabot.transloadit.TransloaditResponse.java
hu.szabot.transloadit.Transloadit.java
hu.szabot.transloadit.assembly.AssemblyBuilder.java
hu.szabot.transloadit.assembly.IAssemblyBuilder.java
hu.szabot.transloadit.assembly.IStep.java
hu.szabot.transloadit.assembly.Step.java
hu.szabot.transloadit.assembly.exceptions.AlreadyDefinedKeyException.java
hu.szabot.transloadit.assembly.exceptions.InvalidFieldKeyException.java
hu.szabot.transloadit.exceptions.FileNotOpenableException.java
hu.szabot.transloadit.exceptions.NotParseableException.java
hu.szabot.transloadit.executor.DefaultHttpExecutor.java
hu.szabot.transloadit.executor.IRequestExecutor.java
hu.szabot.transloadit.executor.ParsedApiData.java
hu.szabot.transloadit.log.TransloaditLogger.java
hu.szabot.transloadit.parser.IRequestParser.java
hu.szabot.transloadit.parser.IResponseParser.java
hu.szabot.transloadit.parser.JSONRequestParser.java
hu.szabot.transloadit.parser.JSONResponseParser.java
hu.szabot.transloadit.utils.ShaUtils.java