Examples of BoxEventRequestObject


Examples of com.box.boxjavalibv2.requests.requestobjects.BoxEventRequestObject

    }

    @Test
    public void testGetEvents() throws Exception {
        // using com.box.boxjavalibv2.requests.requestobjects.BoxEventRequestObject message body for single parameter "eventRequest"
        final BoxEventRequestObject requestObject =
                BoxEventRequestObject.getEventsRequestObject(BoxEventRequestObject.STREAM_POSITION_NOW);
        BoxEventCollection result = requestBody("direct://GETEVENTS", requestObject);

        assertNotNull("getEvents result", result);
        LOG.debug("getEvents: " + result);
View Full Code Here

Examples of com.box.boxjavalibv2.requests.requestobjects.BoxEventRequestObject

                                final String message = rtsResponse.get(MESSAGE);
                                if (NEW_CHANGE.equals(message)) {

                                    // get events
                                    final BoxEventRequestObject requestObject =
                                        BoxEventRequestObject.getEventsRequestObject(currentStreamPosition);
                                    requestObject.setStreamType(streamType);
                                    requestObject.setLimit(limit);
                                    final BoxEventCollection events = eventsManager.getEvents(requestObject);

                                    // notify callback
                                    callback.onEvent(events);
View Full Code Here

Examples of com.box.boxjavalibv2.requests.requestobjects.BoxEventRequestObject

    }

    private long getCurrentStreamPosition(IBoxEventsManager eventsManager, long streamPosition)
        throws BoxRestException, BoxServerException, AuthFatalFailureException {

        final BoxEventRequestObject requestObject =
            BoxEventRequestObject.getEventsRequestObject(streamPosition);
        final BoxEventCollection events = eventsManager.getEvents(requestObject);
        streamPosition = events.getNextStreamPosition();
        return streamPosition;
    }
View Full Code Here

Examples of com.box.boxjavalibv2.requests.requestobjects.BoxEventRequestObject

    }

    private BoxRealTimeServer getBoxRealTimeServer(long currentStreamPosition, IBoxEventsManager eventsManager)
        throws BoxRestException, BoxServerException, AuthFatalFailureException {

        final BoxEventRequestObject optionsRequest =
            BoxEventRequestObject.getEventsRequestObject(currentStreamPosition);

        final BoxCollection eventOptions = eventsManager.getEventOptions(optionsRequest);
        final ArrayList<BoxTypedObject> entries = eventOptions.getEntries();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.