CollectionResponse

com.google.api.server.spi.response

Class CollectionResponse<T>

  • java.lang.Object
    • com.google.api.server.spi.response.CollectionResponse<T>


  • public class CollectionResponse<T>
    extends java.lang.Object
    Collection response to be returned by an endpoint implementation method that wants to support pagination (and other metadata about returned collection in the future). Endpoint implementation method would do something like this to use it:

    public CollectionResponse<Greeting> list(@Named("pageToken") String pageToken) { List<Greeting> greetings = new ArrayList<Greeting>(); // use pageToken to fill greetings with next page of items return CollectionResponse.<Greeting>builder() .setItems(greetings) .setNextPageToken("newPageToken") .build(); }

    • Constructor Detail

      • CollectionResponse

        protected CollectionResponse(java.util.Collection<T> items,
                                     java.lang.String nextPageToken)
    • Method Detail

      • getNextPageToken

        public java.lang.String getNextPageToken()
      • getItems

        public java.util.Collection<T> getItems()
このページは役立ちましたか?評価をお願いいたします。

フィードバックを送信...

Cloud Endpoints Frameworks for App Engine
ご不明な点がありましたら、Google のサポートページをご覧ください。