Skip to content

EasySmartHouse services light client based on GWT-RPC binary protocol

Notifications You must be signed in to change notification settings

EasySmartHouse/easysmarthouse-grpc-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EasySmartHouse services client

Light client based on GWT-RPC binary protocol that may be used to connect to EasySmartHouse services from any thin client or Android application.

The goals of the project are the study of GWT-RPC binary protocol and writing a light client to use it.

Usage

Service definition

import by.ginger.smarthome.provider.device.actuator.Actuator;
import com.github.creepid.grpc.client.ServiceRelativePath;
import java.util.List;

@ServiceRelativePath("actuators")
public interface ActuatorsService {

    public List<Actuator> getActuators();

    public void changeState(String address, Boolean state);

    public void changeState(String address, Double state);

}

Service client examples

GRpcSettings settings = new GRpcSettings();
//define base services url
settings.put(GRpcSetting.BASE_URL, "http://localhost:8080/webui/webui/");
//set GWT policy filename
settings.put(GRpcSetting.POLICY_FILE_STRONG_NAME, "716B355B2C588BA58EC6DD661C6990FB");

//create the service 
ActuatorsService service = (ActuatorsService) GRPC.create(ActuatorsService.class, settings);

//use the service
List<Actuator> actuators = service.getActuators();
...

About

EasySmartHouse services light client based on GWT-RPC binary protocol

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages