Class TriggerCollectorImpl

    • Constructor Detail

      • TriggerCollectorImpl

        public TriggerCollectorImpl​(PlcConnectionManager plcConnectionManager,
                                    long schedulerInterval,
                                    long futureTimeout,
                                    int poolSizeScheduler,
                                    int poolSizeExecutor)
      • TriggerCollectorImpl

        public TriggerCollectorImpl​(PlcConnectionManager plcConnectionManager,
                                    long schedulerInterval,
                                    long futureTimeout)
    • Method Detail

      • submitTrigger

        public String submitTrigger​(String tag,
                                    String plcConnectionString,
                                    long interval)
                             throws ScraperException
        submits a trigger request to TriggerCollector
        Specified by:
        submitTrigger in interface TriggerCollector
        Parameters:
        tag - a (plc) tag that is used for triggering procedure
        plcConnectionString - the connection string to the regarding source
        interval - max awaiting time until request shall be submitted
        Returns:
        a uuid under that the request is handled internally
        Throws:
        ScraperException - something went wrong
      • requestResult

        public Object requestResult​(String uuid)
                             throws ScraperException
        requests the result of submitted plc request with default timeout
        Specified by:
        requestResult in interface TriggerCollector
        Parameters:
        uuid - uuid that represents the request
        Returns:
        the object acquired by requesting plc instance
        Throws:
        ScraperException - something went wrong
      • requestResult

        public Object requestResult​(String uuid,
                                    long timeout)
        requests the result of submitted plc request
        Specified by:
        requestResult in interface TriggerCollector
        Parameters:
        uuid - uuid that represents the request
        timeout - timeout until response shall be acquired
        Returns:
        the object acquired by requesting plc instance
      • start

        public void start()
        starts the acquirement of triggers
        Specified by:
        start in interface TriggerCollector
      • stop

        public void stop()
        stops acquirement of triggers
        Specified by:
        stop in interface TriggerCollector