OutboxTask

public class OutboxTask implements ActiveTask
Author:Donahue Sze, Twinsen Tsang (modifiers)

Constructors

OutboxTask

public OutboxTask(MessageDVO message)

Explicit Constructor.

Parameters:
  • message

Methods

execute

public void execute()

The main execution of OutboxTask. The overview procedure is listed in below:

  1. Extract the EbXMLMessage from the messageDVO.
  2. Sign the EbXMLMessage by it’s keystore if necessary.
  3. Send the EbXMLMessage through HTTP/HTTPS/SMTP protocol.
  4. Update the number of retry attempted to deliver for this EbXMLMessage.

getMaxRetries

public int getMaxRetries()

Get the maximum execution times for this task. It returns the total number of times that the EbXML Message can be attempted to deliver (including non-retry delivery). For EbXML Message does not requests ACK, this method always return zero because it does not support retry / re-sending schema when ACK does not requested. [ebMSS section 6.4.3] It is calculated by : Max(maximum retry defined in partnership for this message - 1,0) + 1.

See also: hk.hku.cecid.piazza.commons.module.ActiveTask.getMaxRetries(), hk.hku.cecid.ebms.spa.dao.PartnershipDVO.getRetries(), hk.hku.cecid.ebms.spa.dao.OutboxDVO.getRetried()

getRetryInterval

public long getRetryInterval()

isRetryEnabled

public boolean isRetryEnabled()

isSucceedFast

public boolean isSucceedFast()

onAwake

public void onAwake()

onFailure

public void onFailure(Throwable t)

Invoke when execute() throw any kind of uncaught exception.

setRetried

public void setRetried(int retried)
Parameters:
  • retried – The number of times that this active task has been retried (local retired times).

See also: hk.hku.cecid.piazza.commons.module.ActiveTask.setRetried(int)