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
需要協助嗎?請前往我們的支援網頁