Search in sources :

Example 1 with RpcServer

use of org.eclipse.smarthome.binding.homematic.internal.communicator.server.RpcServer in project smarthome by eclipse.

the class AbstractHomematicGateway method startServers.

/**
 * Starts the Homematic RPC server.
 */
private synchronized void startServers() throws IOException {
    for (TransferMode mode : availableInterfaces.values()) {
        if (!rpcServers.containsKey(mode)) {
            RpcServer rpcServer = mode == TransferMode.XML_RPC ? new XmlRpcServer(this, config) : new BinRpcServer(this, config);
            rpcServers.put(mode, rpcServer);
            rpcServer.start();
        }
    }
    for (HmInterface hmInterface : availableInterfaces.keySet()) {
        getRpcClient(hmInterface).init(hmInterface, hmInterface.toString() + "-" + id);
    }
}
Also used : BinRpcServer(org.eclipse.smarthome.binding.homematic.internal.communicator.server.BinRpcServer) BinRpcServer(org.eclipse.smarthome.binding.homematic.internal.communicator.server.BinRpcServer) RpcServer(org.eclipse.smarthome.binding.homematic.internal.communicator.server.RpcServer) XmlRpcServer(org.eclipse.smarthome.binding.homematic.internal.communicator.server.XmlRpcServer) TransferMode(org.eclipse.smarthome.binding.homematic.internal.communicator.client.TransferMode) XmlRpcServer(org.eclipse.smarthome.binding.homematic.internal.communicator.server.XmlRpcServer) HmInterface(org.eclipse.smarthome.binding.homematic.internal.model.HmInterface)

Aggregations

TransferMode (org.eclipse.smarthome.binding.homematic.internal.communicator.client.TransferMode)1 BinRpcServer (org.eclipse.smarthome.binding.homematic.internal.communicator.server.BinRpcServer)1 RpcServer (org.eclipse.smarthome.binding.homematic.internal.communicator.server.RpcServer)1 XmlRpcServer (org.eclipse.smarthome.binding.homematic.internal.communicator.server.XmlRpcServer)1 HmInterface (org.eclipse.smarthome.binding.homematic.internal.model.HmInterface)1