public void sendTwinPatch()

in docker_images/java/wrapper/src/main/java/glue/ModuleGlue.java [593:619]


    public void sendTwinPatch(String connectionId, Twin twin, Handler<AsyncResult<Void>> handler)
    {
        System.out.printf("sendTwinPatch called for %s%n", connectionId);
        System.out.println(twin.toString());

        ModuleClient client = getClient(connectionId);
        if (client == null)
        {
            handler.handle(Future.failedFuture(new MainApiException(500, "invalid connection id")));
        }
        else
        {
            TwinCollection reportedProperties = new TwinCollection((LinkedHashMap<String, Object>)twin.getReported());
            this._deviceTwinStatusCallback.setHandler(handler);
            try
            {
                reportedProperties.setVersion(client.getTwin().getReportedProperties().getVersion());
                client.updateReportedProperties(reportedProperties);
                handler.handle(Future.succeededFuture());
            }
            catch (Exception e)
            {
                this._deviceTwinStatusCallback.setHandler(null);
                handler.handle(Future.failedFuture(e));
            }
        }
    }