Examples of LongPollState


Examples of com.serotonin.m2m2.web.dwr.longPoll.LongPollState

    }

    @Override
    public void handleLongPoll(LongPollData data, Map<String, Object> response, User user) {
        if (data.getRequest().hasHandler("jspView")) {
            LongPollState state = data.getState();
            List<JspComponentState> jspViewStates = JspViewsCommon.getJspViewListStates(data);

            synchronized (state) {
                List<JspComponentState> newStates = getViewPointData();
                List<JspComponentState> differentStates = new ArrayList<JspComponentState>();
View Full Code Here

Examples of com.serotonin.m2m2.web.dwr.longPoll.LongPollState

            viewEdit = true;
        else if (data.getRequest().hasHandler("graphicalViewAnon"))
            anon = true;

        if (view || viewEdit || anon) {
            LongPollState state = data.getState();
            List<ViewComponentState> graphicalViewStates = GraphicalViewsCommon.getGraphicalViewListStates(data);

            List<ViewComponentState> newStates;

            synchronized (state) {
View Full Code Here

Examples of com.serotonin.m2m2.web.dwr.longPoll.LongPollState

    }

    @Override
    public void handleLongPoll(LongPollData data, Map<String, Object> response, User user) {
        if (data.getRequest().hasHandler(key) && user != null) {
            LongPollState state = data.getState();
            List<WatchListState> watchListStates = WatchListCommon.getWatchListStates(data);

            synchronized (state) {
                List<WatchListState> newStates = watchListDwr.getPointData();
                List<WatchListState> differentStates = new ArrayList<WatchListState>();

                for (WatchListState newState : newStates) {
                    WatchListState oldState = getWatchListState(newState.getId(), watchListStates);
                    if (oldState == null)
                        differentStates.add(newState);
                    else {
                        WatchListState copy = newState.clone();
                        copy.removeEqualValue(oldState);
                        if (!copy.isEmpty())
                            differentStates.add(copy);
                    }
                }

                if (!differentStates.isEmpty()) {
                    response.put("watchListStates", differentStates);
                    state.setAttribute("watchListStates", newStates);
                }
            }
        }
    }
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.