The basic state model for the DomainDownload Program is presented in Figure A.2. The Program has three primary states, Ready, Running, and Halted which are aligned with the standard states of a ProgramStateMachineType. Additionally, the DomainDownloadType extends the ProgramStateMachineType by defining subordinate State Machines for the Program’s Running and Halted states. The subordinate states describe the download operations in greater detail and allow the Client to monitor the activity of the download at a finer resolution.
An instance (Program Invocation) of a DomainDownload Program is created by the Client each time a download is to be performed. The instance exists until explicitly removed by the Client. The initial state of the Program is Ready and the terminal state is Halted. The DomainDownload can be temporarily suspended and then resumed or aborted. Once halted, the program may not be restarted.
Figure A.2 – DomainDownload state diagram
The sequence of state transitions is illustrated in Figure A.2. Once the download is started, The Program progresses to the Opening state. After the source of the data is opened, a sequence of transfers occurs in the Sending state. When the transfer completes the Objects are closed in the Closing state. If the transfer is terminated before all of the data is downloaded or an error is encountered then the download is halted and the Program transitions to the Aborted state; otherwise the Program halts in the Completed state. The states are presented in Table A.1 along with the state transitions.