All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.digitalpetri.enip.cip.services.CipServiceInvoker Maven / Gradle / Ivy

There is a newer version: 1.5.0-RC1
Show newest version
package com.digitalpetri.enip.cip.services;

import java.util.concurrent.CompletableFuture;

public interface CipServiceInvoker {

    /**
     * Invoke a service request using CIP connected messaging on the provided connection id.
     *
     * @param connectionId the id of the connection to use.
     * @param service      the service to invoke.
     * @return a {@link CompletableFuture} containing the eventual service response or failure.
     */
     CompletableFuture invokeConnected(int connectionId, CipService service);

    /**
     * Invoke a service request using CIP unconnected messaging.
     *
     * @param service the service to invoke.
     * @return a {@link CompletableFuture} containing the eventual service response or failure.
     */
     CompletableFuture invokeUnconnected(CipService service);

    /**
     * Invoke a service request using CIP unconnected messaging, allowing for a number of retries if the destination
     * node returns an error status indicating it is currently busy.
     *
     * @param service    the service to invoke.
     * @param maxRetries the maximum number of retries to attempt.
     * @return a {@link CompletableFuture} containing the eventual service response or failure.
     */
     CompletableFuture invokeUnconnected(CipService service, int maxRetries);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy