SMILA 1.0 API documentation

org.eclipse.smila.http.client.impl
Class DefaultHttpRequestFactory

java.lang.Object
  extended by org.eclipse.smila.http.client.impl.DefaultHttpRequestFactory
All Implemented Interfaces:
HttpRequestFactory

public class DefaultHttpRequestFactory
extends java.lang.Object
implements HttpRequestFactory

Factory for request related Http client objects.

Since:
1.1.0

Field Summary
 
Fields inherited from interface org.eclipse.smila.http.client.impl.base.HttpRequestFactory
CHARSET, CONTENTTYPE_JSON, ENCODING, MIMETYPE_JSON
 
Constructor Summary
DefaultHttpRequestFactory()
           
 
Method Summary
 HttpEntity createEntity(java.io.InputStream inputStream, java.lang.String contentType)
          Wrap an input stream with any content type as an HttpEntity.
 HttpEntity createHttpEntity(Any parameters, Attachments attachments)
          Create an HTTP entity from the input data.
 HttpEntity createJsonEntity(Any parameters)
          Write parameters to JSON and wrap as an HttpEntity.
 HttpEntity createJsonEntity(java.io.InputStream inputStream)
          Wrap an UTF-8-JSON input stream as an HttpEntity.
 HttpEntity createMultipartEntity(Any parameters, Attachments attachments)
          Create a multipart entity for a JSON metadata body and attachments.
 HttpUriRequest getHttpMethod(HttpMethod method, java.lang.String url)
          Create request object for method and url.
 HttpUriRequest getHttpMethod(HttpMethod method, java.lang.String url, HttpParams methodParams)
          Create request object for method and URL and set optional parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultHttpRequestFactory

public DefaultHttpRequestFactory()
Method Detail

getHttpMethod

public HttpUriRequest getHttpMethod(HttpMethod method,
                                    java.lang.String url)
Description copied from interface: HttpRequestFactory
Create request object for method and url.

Specified by:
getHttpMethod in interface HttpRequestFactory

getHttpMethod

public HttpUriRequest getHttpMethod(HttpMethod method,
                                    java.lang.String url,
                                    HttpParams methodParams)
Description copied from interface: HttpRequestFactory
Create request object for method and URL and set optional parameters.

Specified by:
getHttpMethod in interface HttpRequestFactory

createJsonEntity

public HttpEntity createJsonEntity(Any parameters)
                            throws java.io.IOException
Description copied from interface: HttpRequestFactory
Write parameters to JSON and wrap as an HttpEntity.

Specified by:
createJsonEntity in interface HttpRequestFactory
Throws:
java.io.IOException

createJsonEntity

public HttpEntity createJsonEntity(java.io.InputStream inputStream)
                            throws java.io.IOException
Description copied from interface: HttpRequestFactory
Wrap an UTF-8-JSON input stream as an HttpEntity.

Specified by:
createJsonEntity in interface HttpRequestFactory
Throws:
java.io.IOException

createEntity

public HttpEntity createEntity(java.io.InputStream inputStream,
                               java.lang.String contentType)
                        throws java.io.IOException
Description copied from interface: HttpRequestFactory
Wrap an input stream with any content type as an HttpEntity.

Specified by:
createEntity in interface HttpRequestFactory
Throws:
java.io.IOException

createHttpEntity

public HttpEntity createHttpEntity(Any parameters,
                                   Attachments attachments)
                            throws java.io.IOException
Description copied from interface: HttpRequestFactory
Create an HTTP entity from the input data.

Specified by:
createHttpEntity in interface HttpRequestFactory
Throws:
java.io.IOException

createMultipartEntity

public HttpEntity createMultipartEntity(Any parameters,
                                        Attachments attachments)
                                 throws java.io.IOException
Description copied from interface: HttpRequestFactory
Create a multipart entity for a JSON metadata body and attachments.

Specified by:
createMultipartEntity in interface HttpRequestFactory
Throws:
java.io.IOException

SMILA 1.0 API documentation