C - RestConnection type for connection.S - Serializable type for watermark item.A - Object type for attributes.public abstract class RestPollingSource<C extends RestConnection,S extends Serializable,A> extends org.mule.runtime.extension.api.runtime.source.PollingSource<InputStream,A>
PollingSource.| Modifier and Type | Field and Description |
|---|---|
protected RestConfiguration |
config |
protected C |
connection |
protected org.mule.runtime.api.connection.ConnectionProvider<C> |
connectionProvider |
protected RestPollingSourceStrategy<S,A> |
restPollingSourceStrategy |
| Constructor and Description |
|---|
RestPollingSource() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart() |
protected void |
doStop() |
protected org.mule.runtime.api.metadata.MediaType |
getDefaultResponseMediaType()
This method specifies the
MediaType that should be assumed the response to have in case the remote service doesn't
specify a Content-Type header. |
protected org.mule.runtime.api.el.ExpressionLanguage |
getExpressionLanguage() |
protected abstract org.mule.runtime.http.api.domain.message.request.HttpRequest |
getRequest(Optional<S> lastWatermark)
This method generates the http request to be executed for the polling source at each execution time
|
protected abstract RestPollingSourceStrategy<S,A> |
getRestPollingSourceStrategy()
This method specifies the
RestPollingSourceStrategy that must be defined as the rest polling source strategy. |
void |
onRejectedItem(org.mule.runtime.extension.api.runtime.operation.Result<InputStream,A> result,
org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext) |
void |
poll(org.mule.runtime.extension.api.runtime.source.PollContext<InputStream,A> pollContext) |
@Connection protected org.mule.runtime.api.connection.ConnectionProvider<C extends RestConnection> connectionProvider
protected C extends RestConnection connection
@Config protected RestConfiguration config
protected RestPollingSourceStrategy<S extends Serializable,A> restPollingSourceStrategy
protected org.mule.runtime.api.el.ExpressionLanguage getExpressionLanguage()
protected abstract RestPollingSourceStrategy<S,A> getRestPollingSourceStrategy() throws org.mule.runtime.api.exception.MuleException
RestPollingSourceStrategy that must be defined as the rest polling source strategy. The
rest polling source strategy is needed to process the responses obtained from any SaaSRestPollingSourceStrategy to be assigned as the strategy of current polling sourceorg.mule.runtime.api.exception.MuleExceptionprotected org.mule.runtime.api.metadata.MediaType getDefaultResponseMediaType()
MediaType that should be assumed the response to have in case the remote service doesn't
specify a Content-Type header. MediaType to assign the response in case the server doesn't specify one in its responseprotected void doStart()
throws org.mule.runtime.api.exception.MuleException
doStart in class org.mule.runtime.extension.api.runtime.source.PollingSource<InputStream,A>org.mule.runtime.api.exception.MuleExceptionprotected void doStop()
doStop in class org.mule.runtime.extension.api.runtime.source.PollingSource<InputStream,A>public void poll(org.mule.runtime.extension.api.runtime.source.PollContext<InputStream,A> pollContext)
poll in class org.mule.runtime.extension.api.runtime.source.PollingSource<InputStream,A>public void onRejectedItem(org.mule.runtime.extension.api.runtime.operation.Result<InputStream,A> result, org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext)
onRejectedItem in class org.mule.runtime.extension.api.runtime.source.PollingSource<InputStream,A>protected abstract org.mule.runtime.http.api.domain.message.request.HttpRequest getRequest(Optional<S> lastWatermark)
lastWatermark - latest watermark obtainedHttpRequest to be executedCopyright © 2023. All rights reserved.