Class ExternalSystem

  • Direct Known Subclasses:
    HttpExternalSystem

    public abstract class ExternalSystem
    extends Object
    Used to define the communication with an external system. Classes extending this class must be annotated with Protocol to declare the communication protocol it uses. The class must be used to retrieve instances of this class.
    • Constructor Detail

      • ExternalSystem

        public ExternalSystem()
    • Method Detail

      • send

        public abstract CompletableFuture<ExternalSystemResponse> send​(Supplier<? extends InputStream> inputStreamSupplier)
        Sends information to the external system
        Parameters:
        inputStreamSupplier - A supplier of the input stream with the data to be sent
        Returns:
        a CompletableFuture containing the response data coming from the external system
      • configure

        protected void configure​(ExternalSystemData configuration)
        Configures the external system instance with the provided configuration. The extensions of this class must use this method to initialize their own configuration fields.
        Parameters:
        configuration - Provides the configuration data of the external system
        Throws:
        ExternalSystemConfigurationError - in case the external system cannot be properly configured
      • getName

        protected String getName()
        Returns:
        the name of the external system