public static class BoxRequestsEvent.GetUserEvents extends BoxRequest<E,R>
BoxRequest.BoxRequestHandler<R extends BoxRequest>, BoxRequest.ContentTypes, BoxRequest.Methods, BoxRequest.TLSSSLSocketFactory| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FIELD_LIMIT |
static java.lang.String |
FIELD_STREAM_POSITION |
static java.lang.String |
FIELD_STREAM_TYPE |
static java.lang.String |
STREAM_TYPE_ALL |
static java.lang.String |
STREAM_TYPE_CHANGES |
static java.lang.String |
STREAM_TYPE_SYNC |
JSON_OBJECT, mBodyMap, mContentType, mHeaderMap, mListener, mQueryMap, mRequestMethod, mRequestUrlString, mRequiresSocket, mSession, mTimeout| Constructor and Description |
|---|
GetUserEvents(java.lang.String requestUrl,
BoxSession session)
Creates a user event stream request with the default parameters.
|
| Modifier and Type | Method and Description |
|---|---|
static BoxRequest.BoxRequestHandler<com.box.androidsdk.content.requests.BoxRequestEvent> |
createRequestHandler(com.box.androidsdk.content.requests.BoxRequestEvent request) |
E |
onSend()
Synchronously make the request to Box and handle the response appropriately.
|
protected void |
onSendCompleted(BoxResponse<E> response)
Post action that will be performed after a successful send occurs.
|
E |
sendForCachedResult()
Sends the request to fetch results from cache synchronously.
|
R |
setLimit(int limit)
Sets the maximum number of events to return in the list of events.
|
R |
setPreviousListEvents(E listEvents)
Convenience method.
|
R |
setStreamPosition(java.lang.String streamPosition)
Sets the stream position of items that should be returned.
|
BoxRequestsEvent.GetUserEvents |
setStreamType(java.lang.String streamType)
Sets the stream type to limit the type of events in the response.
|
BoxFutureTask<E> |
toTaskForCachedResult()
Converts the request to a BoxCacheFutureTask that can be used to execute the request
asynchronously.
|
buildUrl, createHeaderMap, createHttpRequest, createQuery, equals, getIfMatchEtag, getIfNoneMatchEtag, getRequestHandler, getSession, getSocket, getStringBody, handleSendForCachedResult, handleToTaskForCachedResult, handleUpdateCache, hashCode, importRequestContentMapsFrom, logDebug, logRequest, parseHashMapEntry, parseJsonObject, send, sendRequest, setBody, setContentType, setHeaders, setIfMatchEtag, setIfNoneMatchEtag, setRequestHandler, setTimeOut, toTaskpublic static final java.lang.String STREAM_TYPE_ALL
public static final java.lang.String STREAM_TYPE_CHANGES
public static final java.lang.String STREAM_TYPE_SYNC
public static final java.lang.String FIELD_STREAM_POSITION
public static final java.lang.String FIELD_STREAM_TYPE
public static final java.lang.String FIELD_LIMIT
public GetUserEvents(java.lang.String requestUrl,
BoxSession session)
requestUrl - URL for the events endpoint.session - the authenticated session that will be used to make the request with.public BoxRequestsEvent.GetUserEvents setStreamType(java.lang.String streamType)
streamType - type of events to return. Can be "all", "changes", or "sync".public static BoxRequest.BoxRequestHandler<com.box.androidsdk.content.requests.BoxRequestEvent> createRequestHandler(com.box.androidsdk.content.requests.BoxRequestEvent request)
public R setStreamPosition(java.lang.String streamPosition)
streamPosition - stream position to start from for returning events.public R setLimit(int limit)
limit - max number of events to request.public R setPreviousListEvents(E listEvents)
listEvents - A list of events to add to.public E onSend()
throws BoxException
BoxRequestonSend in class BoxRequest<E extends BoxJsonObject,R extends BoxRequest<E,R>>BoxException - thrown if there was a problem with handling the request.public E sendForCachedResult()
throws BoxException
BoxCacheableRequestsendForCachedResult in interface BoxCacheableRequest<E extends BoxJsonObject>BoxException - thrown if there is no implementation of BoxCache set in BoxConfig, or if
there was another issue getting cached results.public BoxFutureTask<E> toTaskForCachedResult() throws BoxException
BoxCacheableRequesttoTaskForCachedResult in interface BoxCacheableRequest<E extends BoxJsonObject>BoxException - thrown if there is no implementation of BoxCache set in BoxConfig.protected void onSendCompleted(BoxResponse<E> response) throws BoxException
BoxRequestonSendCompleted in class BoxRequest<E extends BoxJsonObject,R extends BoxRequest<E,R>>response - response of the BoxRequestBoxException - thrown if there was a problem with handling the request.