DistributionServiceDelegateImpl

public class DistributionServiceDelegateImpl implements DistributionServiceDelegate

Default implementation of org.motechproject.hub.service.DistributionServiceDelegate

Constructors

DistributionServiceDelegateImpl

public DistributionServiceDelegateImpl(HttpAgent httpAgentImpl, SettingsFacade settingsFacade)

Creates a new instance of DistributionServiceDelegateImpl, with all fields set to the autowired parameter values.

Parameters:

Methods

distribute

public void distribute(String callbackUrl, String content, MediaType contentType, String topicUrl)

getContent

public ResponseEntity<String> getContent(String topicUrl)

getHttpAgentImpl

public HttpAgent getHttpAgentImpl()

Gets the HttpAgent which is an OSGI service used for sending http requests.

Returns:the http agent

setHttpAgentImpl

public void setHttpAgentImpl(HttpAgent httpAgentImpl)

Sets the HttpAgent which is an OSGI service used for sending http requests.

Parameters:
  • httpAgentImpl – the http agent to be set

setRetryCount

public void setRetryCount(String retryCount)

Sets the number of allowed request retries in case of request error.

Parameters:
  • retryCount – the retry count to be set

setRetryInterval

public void setRetryInterval(String retryInterval)

Sets the interval between request retries in case of request error.

Parameters:
  • retryInterval – the retry interval to be set