3.5.1.1 State Machine

The following figure shows the state machine of the IIpamEnumerator server port type.

IIpamEnumerator - server state machine

Figure 4: IIpamEnumerator - server state machine

The IIpamEnumerator server is session-based and stateful in nature. The session state variable will be used to keep track of the current state for each session and it can have the following states as possible values. At any point of the session, if the session is known to be faulted or closed by the lower layer, the state machine ends.

State

Description

Session Initialized

This would be the initial state of the session when it has been indicated from the lower layer of the protocol.

When in this state, when the InitializeEnumeration operation is invoked (by the client), the data received as a part of the InitializeEnumeration is validated.

If the data validation succeeds, the state is changed to Enumeration Initialized.

If the data validation fails, the server returns an appropriate SOAP fault and remains in the Session Initialized state itself.

Enumeration Initialized

This would be the state when the enumerator is initialized and ready to start the processing to return the data back to the client.

When in this state, the StartEnumeration operation is invoked (by the client), the server invokes the NotifyEnumerationStart and triggers the enumeration processing. The state is changed to Enumeration Started.

Enumeration Started

This state denotes the enumeration has been initialized successfully and the enumeration processing is currently in progress.

If there is data available to be sent across from the enumeration processing, the EnumeratedRowsCallback operation is invoked with the data available and the state is changed to Enumeration In Progress.

If there is no data available but the enumeration processing completes successfully, the NotifyEnumerationComplete operation is invoked and the state is changed to Enumeration Completed.

If there is no data available but the enumeration processing has failed with some error, the NotifyEnumerationComplete is called to provide the fault information to the client and the state is changed to Enumeration Completed.

Enumeration In Progress

This state denotes the enumeration is in progress and more data is available to be sent across to the client.

If there is data available to be sent across from the enumeration processing, the EnumeratedRowsCallback operation is invoked with the data available and the state remains at Enumeration In Progress.

If there is no data available but the enumeration processing completes successfully, the NotifyEnumerationComplete operation is invoked and the state is changed to Enumeration Completed.

If there is no data available but the enumeration processing has failed with some error, the NotifyEnumerationComplete is called to provide the fault information to the client and the state is changed to Enumeration Completed.

Enumeration Completed

This state indicates there is no further processing required in the session and proceeds to close the session itself.