Class AbstractTwinPublisher

    • Field Detail

      • objectMapper

        protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper
    • Constructor Detail

      • AbstractTwinPublisher

        public AbstractTwinPublisher​(LocalTwinSubscriber localTwinSubscriber)
    • Method Detail

      • handleSinkUpdate

        protected abstract void handleSinkUpdate​(TwinUpdate sinkUpdate)
        Parameters:
        sinkUpdate - Handle sink Update from @AbstractTwinPublisher.
      • register

        public <T> TwinPublisher.Session<T> register​(java.lang.String key,
                                                     java.lang.Class<T> clazz,
                                                     java.lang.String location)
                                              throws java.io.IOException
        Specified by:
        register in interface TwinPublisher
        Type Parameters:
        T - type of object for replication
        Parameters:
        key - unique key for the object.
        clazz - a class used for serialization.
        location - targeted Minion location for the object, set null for all locations.
        Returns:
        Session which provides updates to object.
        Throws:
        java.io.IOException
      • mapTwinRequestProto

        protected TwinRequest mapTwinRequestProto​(byte[] twinRequestBytes)