Search in sources :

Example 1 with HttpGetRequestType

use of org.eclipse.ecf.remoteservice.rest.client.HttpGetRequestType in project ecf by eclipse.

the class RestContainerTest method testRegisterRestService.

public void testRegisterRestService() throws Exception {
    IContainer container = createRestContainer(RestConstants.TEST_DE_TARGET);
    Dictionary properties = new Hashtable();
    properties.put("user", "null");
    IRemoteCallable callable = RestCallableFactory.createCallable("methodName", "resourcePath", null, new HttpGetRequestType());
    IRemoteServiceRegistration registration = registerCallable(container, callable, properties);
    assertNotNull(registration);
}
Also used : IRemoteCallable(org.eclipse.ecf.remoteservice.client.IRemoteCallable) Dictionary(java.util.Dictionary) Hashtable(java.util.Hashtable) HttpGetRequestType(org.eclipse.ecf.remoteservice.rest.client.HttpGetRequestType) IContainer(org.eclipse.ecf.core.IContainer) IRemoteServiceRegistration(org.eclipse.ecf.remoteservice.IRemoteServiceRegistration)

Example 2 with HttpGetRequestType

use of org.eclipse.ecf.remoteservice.rest.client.HttpGetRequestType in project ecf by eclipse.

the class TimeServiceRestClientContainer method connect.

@Override
public void connect(ID targetID, IConnectContext connectContext1) throws ContainerConnectException {
    super.connect(targetID, connectContext1);
    // Create the IRemoteCallable to represent
    // access to the ITimeService method.
    IRemoteCallable callable = RestCallableFactory.createCallable("getCurrentTime", ITimeService.class.getName(), null, new HttpGetRequestType(), 30000);
    // Register the callable and associate it with the ITimeService class
    // name
    reg = registerCallables(new String[] { ITimeService.class.getName() }, new IRemoteCallable[][] { { callable } }, null);
}
Also used : IRemoteCallable(org.eclipse.ecf.remoteservice.client.IRemoteCallable) ITimeService(com.mycorp.examples.timeservice.ITimeService) HttpGetRequestType(org.eclipse.ecf.remoteservice.rest.client.HttpGetRequestType)

Example 3 with HttpGetRequestType

use of org.eclipse.ecf.remoteservice.rest.client.HttpGetRequestType in project ecf by eclipse.

the class Activator method registerCall.

private IRemoteServiceRegistration registerCall() {
    IRemoteCallable callable = RestCallableFactory.createCallable(RSS_PATH, RSS_PATH, null, new HttpGetRequestType());
    registration = registerCallable(callable, null);
    return registration;
}
Also used : IRemoteCallable(org.eclipse.ecf.remoteservice.client.IRemoteCallable) HttpGetRequestType(org.eclipse.ecf.remoteservice.rest.client.HttpGetRequestType)

Aggregations

IRemoteCallable (org.eclipse.ecf.remoteservice.client.IRemoteCallable)3 HttpGetRequestType (org.eclipse.ecf.remoteservice.rest.client.HttpGetRequestType)3 ITimeService (com.mycorp.examples.timeservice.ITimeService)1 Dictionary (java.util.Dictionary)1 Hashtable (java.util.Hashtable)1 IContainer (org.eclipse.ecf.core.IContainer)1 IRemoteServiceRegistration (org.eclipse.ecf.remoteservice.IRemoteServiceRegistration)1