Class HttpExternalSystem
- java.lang.Object
-
- org.openbravo.service.externalsystem.ExternalSystem
-
- org.openbravo.service.externalsystem.http.HttpExternalSystem
-
public class HttpExternalSystem extends ExternalSystem
Allows to communicate with an external system through HTTP requests
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_TIMEOUT
-
Constructor Summary
Constructors Constructor Description HttpExternalSystem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(ExternalSystemData configuration)
Configures the external system instance with the provided configuration.String
getURL()
CompletableFuture<ExternalSystemResponse>
send(Supplier<? extends InputStream> inputStreamSupplier)
Sends information to the external system-
Methods inherited from class org.openbravo.service.externalsystem.ExternalSystem
getName
-
-
-
-
Field Detail
-
MAX_TIMEOUT
public static final int MAX_TIMEOUT
- See Also:
- Constant Field Values
-
-
Method Detail
-
configure
public void configure(ExternalSystemData configuration)
Description copied from class:ExternalSystem
Configures the external system instance with the provided configuration. The extensions of this class must use this method to initialize their own configuration fields.- Overrides:
configure
in classExternalSystem
- Parameters:
configuration
- Provides the configuration data of the external system
-
send
public CompletableFuture<ExternalSystemResponse> send(Supplier<? extends InputStream> inputStreamSupplier)
Description copied from class:ExternalSystem
Sends information to the external system- Specified by:
send
in classExternalSystem
- 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
-
getURL
public String getURL()
- Returns:
- the URL that this HTTP external system communicates with
-
-