|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ecf.remoteservice.rest.RestService
public class RestService
This class represents a REST service from the client side of view. So a RESTful
web service can be accessed via the methods provided by this class. Mostly the
methods are inherited from IRemoteService.
| Constructor Summary | |
|---|---|
RestService()
|
|
RestService(IRemoteServiceReference reference)
|
|
RestService(java.lang.Object proxy)
|
|
| Method Summary | |
|---|---|
protected void |
addGetParams(org.apache.commons.httpclient.HttpMethod httpMethod,
java.lang.Object[] restParams)
|
protected void |
addPostParams(org.apache.commons.httpclient.HttpMethod httpMethod,
java.lang.Object[] restParams,
org.apache.commons.httpclient.methods.RequestEntity requestEntity)
|
protected void |
addPutRequestBody(IRestCall restCall,
org.apache.commons.httpclient.HttpMethod httpMethod)
|
org.eclipse.equinox.concurrent.future.IFuture |
callAsync(IRemoteCall call)
Call remote method specified by call parameter asynchronously, and immediately return IFuture instance. |
void |
callAsync(IRemoteCall call,
IRemoteCallListener listener)
Call remote method specified by call parameter asynchronously, and notify specified listener when call starts and completes. |
org.eclipse.equinox.concurrent.future.IFuture |
callAsync(IRestCall call)
|
void |
callAsync(IRestCall restCall,
IRemoteCallListener listener)
|
java.lang.Object |
callHttpMethod(IRestCall restCall)
Calls the Rest service with given URL of IRestCall. |
java.lang.Object |
callSync(IRemoteCall call)
Call remote method specified by call parameter synchronously. |
java.lang.Object |
callSync(IRestCall call)
|
protected org.apache.commons.httpclient.HttpMethod |
createHttpMethod(IRestCall restCall,
java.lang.String url)
|
void |
fireAsync(IRemoteCall call)
Fire remote method specified by call parameter. |
java.lang.Object |
getProxy()
Get local proxy for remote interface. |
protected void |
handleAuthentication(org.apache.commons.httpclient.HttpClient httpClient,
org.apache.commons.httpclient.HttpMethod method)
|
protected void |
handleRequestHeaders(org.apache.commons.httpclient.HttpMethod httpMethod,
java.util.Map requestHeaders)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RestService(IRemoteServiceReference reference)
public RestService(java.lang.Object proxy)
public RestService()
| Method Detail |
|---|
public void callAsync(IRemoteCall call,
IRemoteCallListener listener)
IRemoteService
callAsync in interface IRemoteServicecall - the remote call to make. Must not be null .listener - the listener to notify when call starts and is completed. The
listener will be notified via the two event types
IRemoteCallStartEvent and IRemoteCallCompleteEvent. Must not
be null .IRemoteCallStartEvent,
IRemoteCallCompleteEvent
public void callAsync(IRestCall restCall,
IRemoteCallListener listener)
public org.eclipse.equinox.concurrent.future.IFuture callAsync(IRemoteCall call)
IRemoteServiceIFuture instance. Returned IFuture will not be null,
and allows the caller to retrieve the actual resulting value from the remote call
(or exception).
callAsync in interface IRemoteServicecall - the remote call to make. Must not be null .
IFuture.isDone(), and then to IFuture.get()
the actual result.public org.eclipse.equinox.concurrent.future.IFuture callAsync(IRestCall call)
public java.lang.Object callSync(IRemoteCall call)
throws ECFException
IRemoteService
callSync in interface IRemoteServicecall - the remote call to make
null if
remote provides null as result.
ECFException - thrown if disconnect occurs, caller not currently connected,
or remote throws Exception
public java.lang.Object callSync(IRestCall call)
throws ECFException
ECFException
public java.lang.Object callHttpMethod(IRestCall restCall)
throws ECFException
restCall - The Rest Service to call represented by an IRestCall object
null if an
error occurs.
ECFException
protected void handleRequestHeaders(org.apache.commons.httpclient.HttpMethod httpMethod,
java.util.Map requestHeaders)
protected org.apache.commons.httpclient.HttpMethod createHttpMethod(IRestCall restCall,
java.lang.String url)
throws ECFException
ECFException
protected void addPutRequestBody(IRestCall restCall,
org.apache.commons.httpclient.HttpMethod httpMethod)
throws ECFException
ECFException
protected void addPostParams(org.apache.commons.httpclient.HttpMethod httpMethod,
java.lang.Object[] restParams,
org.apache.commons.httpclient.methods.RequestEntity requestEntity)
protected void addGetParams(org.apache.commons.httpclient.HttpMethod httpMethod,
java.lang.Object[] restParams)
protected void handleAuthentication(org.apache.commons.httpclient.HttpClient httpClient,
org.apache.commons.httpclient.HttpMethod method)
public java.lang.Object getProxy()
throws ECFException
IRemoteService
getProxy in interface IRemoteServicenull .
ECFException - if not currently connected to remote service
public void fireAsync(IRemoteCall call)
throws ECFException
IRemoteService
fireAsync in interface IRemoteServicecall - the remote call to make. Must not be null .
ECFException - if caller not currently connected
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||