public abstract class RestConnectionProvider<C extends RestConnection> extends Object implements org.mule.runtime.api.connection.CachedConnectionProvider<C>, org.mule.runtime.api.lifecycle.Startable, org.mule.runtime.api.lifecycle.Stoppable
| Constructor and Description |
|---|
RestConnectionProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureClient(org.mule.runtime.http.api.client.HttpClientConfiguration.Builder httpConfiguration)
Template method that will be invoked just before the
httpConfiguration is turned into an actual HttpClient. |
C |
connect() |
protected abstract C |
createConnection(org.mule.runtime.http.api.client.HttpClient httpClient)
Creates a new connection
C |
void |
disconnect(C connection) |
abstract String |
getBaseUri() |
void |
start()
Starts the resources related to this connection provider.
|
void |
stop()
Stops the started resources related to this connection provider.
|
org.mule.runtime.api.connection.ConnectionValidationResult |
validate(C connection) |
public abstract String getBaseUri()
public final C connect() throws org.mule.runtime.api.connection.ConnectionException
connect in interface org.mule.runtime.api.connection.ConnectionProvider<C extends RestConnection>org.mule.runtime.api.connection.ConnectionExceptionprotected abstract C createConnection(org.mule.runtime.http.api.client.HttpClient httpClient)
ChttpClient - the client to perform the requestsCpublic final void disconnect(C connection)
disconnect in interface org.mule.runtime.api.connection.ConnectionProvider<C extends RestConnection>public org.mule.runtime.api.connection.ConnectionValidationResult validate(C connection)
validate in interface org.mule.runtime.api.connection.ConnectionProvider<C extends RestConnection>public void start()
start in interface org.mule.runtime.api.lifecycle.Startablepublic void stop()
stop in interface org.mule.runtime.api.lifecycle.Stoppableprotected void configureClient(org.mule.runtime.http.api.client.HttpClientConfiguration.Builder httpConfiguration)
httpConfiguration is turned into an actual HttpClient.
It gives implementations a chance to do extra configurations.httpConfiguration - the configuration builder for the HttpClient about to be created.Copyright © 2022. All rights reserved.