Package com.vaadin.server

Examples of com.vaadin.server.StreamVariable


        Map<String, StreamVariable> map = pidToNameToStreamVariable
                .get(connectorId);
        if (map == null) {
            return null;
        }
        StreamVariable streamVariable = map.get(variableName);
        return streamVariable;
    }
View Full Code Here


                streamVariable);
        assertTrue(targetUrl.startsWith("app://APP/UPLOAD/-1/"
                + owner.getConnectorId() + "/myName/"));

        ConnectorTracker tracker = owner.getUI().getConnectorTracker();
        StreamVariable streamVariable2 = tracker.getStreamVariable(
                owner.getConnectorId(), variableName);
        assertSame(streamVariable, streamVariable2);
    }
View Full Code Here

                    if (files != null) {
                        consoleString += "<br>" + files.length + " file(s):";
                        for (Html5File file : files) {
                            consoleString += "<br>" + file.getFileName();
                            file.setStreamVariable(new StreamVariable() {

                                @Override
                                public void streamingStarted(
                                        StreamingStartEvent event) {
                                }
View Full Code Here

    @Test
    public void getStreamVariable_streamingFailed_endUploadIsCalled() {
        TestUpload upload = new TestUpload();
        upload.startUpload();
        StreamVariable variable = upload.getStreamVariable();
        try {
            variable.streamingFailed(new TestStreamingErrorEvent());
        } catch (Exception e) {
        }
        Assert.assertFalse(upload.isUploading());
    }
View Full Code Here

                                                    + file.getFileName()
                                                    + " was too large, not transferred to the server side.");
                            continue;
                        }

                        StreamVariable streamVariable = new StreamVariable() {

                            @Override
                            public OutputStream getOutputStream() {
                                return new NullOutputStream();
                            }
View Full Code Here

                    for (Html5File html5File : files2) {
                        String fileName = html5File.getFileName();
                        // int bytes = html5File.getFileSize();
                        final ByteArrayOutputStream bas = new ByteArrayOutputStream();

                        StreamVariable streamVariable = new StreamVariable() {

                            @Override
                            public OutputStream getOutputStream() {
                                return bas;
                            }
View Full Code Here

            Html5File[] files = wtr.getFiles();
            if (files != null) {
                for (Html5File html5File : files) {
                    l.setCaption(html5File.getFileName());
                    html5File.setStreamVariable(new StreamVariable() {
                        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();

                        @Override
                        public OutputStream getOutputStream() {
                            return byteArrayOutputStream;
View Full Code Here

        String connectorId = parts[1];
        String variableName = parts[2];

        // These are retrieved while session is locked
        ClientConnector source;
        StreamVariable streamVariable;

        session.lock();
        try {
            UI uI = session.getUIById(Integer.parseInt(uiId));
            UI.setCurrent(uI);
View Full Code Here

        Map<String, StreamVariable> map = pidToNameToStreamVariable
                .get(connectorId);
        if (map == null) {
            return null;
        }
        StreamVariable streamVariable = map.get(variableName);
        return streamVariable;
    }
View Full Code Here

        String connectorId = parts[1];
        String variableName = parts[2];

        // These are retrieved while session is locked
        ClientConnector source;
        StreamVariable streamVariable;

        session.lock();
        try {
            UI uI = session.getUIById(Integer.parseInt(uiId));
            UI.setCurrent(uI);
View Full Code Here

TOP

Related Classes of com.vaadin.server.StreamVariable

Copyright © 2018 www.massapicom. 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.