com.isomorphic.velocity

## Class ResponsesHandler

- java.lang.Object
- - com.isomorphic.velocity.ResponsesHandler

-     public class ResponsesHandler
      extends java.lang.Object

  This class represents the functionality available in Transaction Chaining when you use the $responses template variable. Please scan the client-side documentation for 'transaction chaining' for a full discussion of Transaction Chaining.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DSResponse` | `first(java.lang.String ds)`
    `DSResponse` | `first(java.lang.String ds, java.lang.String operation)`
    `DSResponse` | `getFirst()`
    `DSResponse` | `getLast()`
    `DSResponse` | `last(java.lang.String ds)`
    `DSResponse` | `last(java.lang.String ds, java.lang.String operation)`

- - ### Method Detail

    - #### getFirst

          public DSResponse getFirst()

      Returns:
        The first DSResponse in the current queue

    - #### first

          public DSResponse first(java.lang.String ds)

      Parameters:
        `ds` - DataSource name
      Returns:
        The first DSResponse in the current queue for the parameter DataSource

    - #### first

          public DSResponse first(java.lang.String ds,
                                  java.lang.String operation)

      Parameters:
        `ds` - DataSource name
        `operation` - String representing an operation type, like "fetch" or "add"
      Returns:
        The first DSResponse in the current queue which is for the parameter DataSource and is in response to a DSRequest of the parameter operation type (eg, returns the response to the first "add" on a given DataSource)

    - #### getLast

          public DSResponse getLast()

      Returns:
        The last DSResponse in the current queue

    - #### last

          public DSResponse last(java.lang.String ds)

      Parameters:
        `ds` - DataSource name
      Returns:
        The last DSResponse in the current queue for the parameter DataSource

    - #### last

          public DSResponse last(java.lang.String ds,
                                 java.lang.String operation)

      Parameters:
        `ds` - DataSource name
        `operation` - String representing an operation type, like "fetch" or "add"
      Returns:
        The last DSResponse in the current queue which is for the parameter DataSource and is in response to a DSRequest of the parameter operation type (eg, returns the response to the most recent "add" on a given DataSource)