3.3.1.1 Back-End Client's State

The back-end client uses the following state elements:

  • NotificationType: An enumeration value that represents the way the request entity is sent to the server application. This has the following values:

    • NONE: No server application is associated with the server URL. The request entity is not sent to the server application. The server populates the request entity in the location provided through the destination URL.

    • NOTIFICATION_BY_REFERENCE: The back-end client passes the physical path of the request entity to the server application specified in the NotificationURL state element.

    • NOTIFICATION_BY_VALUE: The back-end client passes request entity data in the body of the request to the server application specified in the NotificationURL property.

  • NotificationURL (Optional): This specifies the URL of the server application to which the server sends the request entity. This MUST be present if the NotificationType property is not NONE.

  • DestinationURL: This SHOULD be passed from the upload server. This is the same as destination URL.

  • RequestEntityPath (section 3.2.1.4): This SHOULD be passed from the upload server.

  • ResponseEntityPath: This represents the physical path to the request entity used in upload-reply (section 1.3.3) mode. The rules specified for Content-Name (section 2.2.1.1) header (maximum character limit, range of characters that can be used) apply to this as well. This information is passed to the upload server.

  • ReplyURL: This is same as reply URL.

  • HTTPStatusCode: This represents the HTTP status code as described in [RFC2616] section 10. This is returned to a server component.

  • BitsErrorCode: This represents BITS-Error (section 2.2.1.2).

  • ShouldcopyToDestination: A Boolean value that specifies whether the destination URL is populated.

  • IsReplyStaticURL: A Boolean value that specifies whether the response sent from the server is a static URL that can be directly downloaded by the client.

The back-end client can be represented in the following states:

 State

 Description

STATE_INIT

This is the initial state for the machine.

STATE_SEND_HEADERS

The back-end client sends the relevant headers to the server application.

STATE_SEND_DATA

The back-end client sends the request entity data to the server application.

STATE_RECEIVE_HEADERS

The back-end client receives the response headers from the server application.

STATE_RECEIVE_DATA

The back-end client receives the response data sent by the server application.

STATE_COMPLETE

The back-end client provides the success HTTP status code and reply URL if applicable to the BITSSessionWrapper object.

STATE_ERROR

The back-end client provides the error HTTP status code to the BITSSessionWrapper object.

Possible state transitions

Figure 6: Possible state transitions