public abstract class

RestCaller

extends Object
java.lang.Object
   ↳ org.mule.module.servicesource.rest.RestCaller
Known Direct Subclasses

Class Overview

Replace this class with the JerseyUtil in connector commons

Summary

Fields
private NewCookie cookie Authentication Cookie
protected Gson gson Gson instance to handle json marshalling/unmarshalling
private static final Logger logger
Public Constructors
RestCaller(NewCookie coockie)
Public Methods
<T> T executeRequest(String method, WebResource r, Object entity, Class<T> type)
<T> List<T> executeRequest(String method, WebResource r)
<T> List<T> executeRequest(String method, WebResource r, Object entity)
String getCoockieValue()
<T> List<T> streamRequest(String method, WebResource r, Object entity, Class<T> type)
Protected Methods
abstract <T> T onResponse(ClientResponse response, String json, Class<T> type)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private NewCookie cookie

Authentication Cookie

protected Gson gson

Gson instance to handle json marshalling/unmarshalling

private static final Logger logger

Public Constructors

public RestCaller (NewCookie coockie)

Parameters
coockie

Public Methods

public T executeRequest (String method, WebResource r, Object entity, Class<T> type)

Parameters
method
r
entity
type

public List<T> executeRequest (String method, WebResource r)

Parameters
method
r

public List<T> executeRequest (String method, WebResource r, Object entity)

Parameters
method
r
entity

public String getCoockieValue ()

public List<T> streamRequest (String method, WebResource r, Object entity, Class<T> type)

Parameters
method
r
entity
type

Protected Methods

protected abstract T onResponse (ClientResponse response, String json, Class<T> type)

Parameters
response
json
type