Iterator Pattern

JOSIF Main Page | JOSIF Guidebook | Modeling | General PatternsInteraction Patterns | Iterator Pattern

 

Iterator Protocol Neutral

Iterator Meta-Model Definitions

In the Interface Meta-Model#Operational_Modeling, the Iterator Pattern applies as one of the special Client-Server exchange cases regarding the transfer of (potentially) large set of (bulk) data. The Iterator Pattern allows the following two data transfer interaction styles:

  • A sequential retrieval of the dataset by iteration-style of data batches (pages) from the first to the last one
  • A more controlled retrieval of the dataset to support a pagination-style navigation through the dataset.

In the Interface Meta-Model (TIP Meta-Model), an operation is explicitly identified using the Iterator Pattern when:

Iterator Implicit Model Definitions

All Iterator Pattern interface model meta-data definitions are implicitly established (not visible to TIP Interface Model projects) in the Iterator package of the JOSIF Framework   TIP Generator Internal Model  sub-project.

Iterator Model Example

Its Tigerstripe model includes the following operation definitions using the Iterator interaction pattern.
The below settings define the output parameter objects as an array of ServiceProblem entity instances that can be retrieved using an iterator because it has the potential to be bulk:

  • TIP service interface: ServiceProblemInterface
  • Operation: getServiceProblemsByTemplate
    • tipOperation stereotype:
      • bulkTransferPattern = ITERATOR
    • Argument:
      • Name: objects
      • Type: org.tmforum.tip.service.problem.ServiceProblem
      • Multiplicity: 0..*
      • Direction: out
      • tipParameter stereotype:
        • passedById is not set (Entity instances are to be returned as an array).
        • isBulkPotential is set (Need for an iterator associated with this array of entity data).

Iterator Protocol Specific