Examples of BinRpcResponse


Examples of org.openhab.binding.homematic.internal.binrpc.BinRpcResponse

        logger.trace("Client BinRpcRequest {}", request);
      }
      socket = new Socket(context.getConfig().getHost(), hmInterface.getPort());
      socket.setSoTimeout(5000);
      socket.getOutputStream().write(request.createMessage());
      BinRpcResponse resp = new BinRpcResponse(socket.getInputStream(), false);

      if (TRACE_ENABLED) {
        logger.trace("Client BinRpcResponse: {}", resp.toString());
      }
      Object[] data = resp.getResponseData();
      if (data != null && data.length > 0) {
        Object responseData = data[0];
        if (responseData instanceof Map) {
          @SuppressWarnings("unchecked")
          Map<String, Object> map = (Map<String, Object>) responseData;
View Full Code Here

Examples of org.openhab.binding.homematic.internal.binrpc.BinRpcResponse

   * Reads the event from the Homematic server and handles the method call.
   */
  @Override
  public void run() {
    try {
      BinRpcResponse response = new BinRpcResponse(socket.getInputStream(), true);
      if (TRACE_ENABLED) {
        logger.trace("Event BinRpcResponse: {}", response.toString());
      }
      byte[] returnValue = handleMethodCall(response.getMethodName(), response.getResponseData());
      if (returnValue != null) {
        socket.getOutputStream().write(returnValue);
      }
    } catch (EOFException eof) {
      // ignore
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.