Examples of DataFrame


Examples of org.eclipse.jetty.websocket.common.frames.DataFrame

        {
            if (LOG.isDebugEnabled())
            {
                LOG.debug("sendPartialString({}, {})", fragment, isLast);
            }
            DataFrame frame = first ? new TextFrame() : new ContinuationFrame();
            frame.setPayload(BufferUtil.toBuffer(fragment, StandardCharsets.UTF_8));
            frame.setFin(isLast);
            blockingWrite(frame);
        }
        finally
        {
            if (isLast)
View Full Code Here

Examples of org.eclipse.jetty.websocket.common.frames.DataFrame

        int len = msg.length;
        boolean continuation = false;
        byte mini[];
        for (int i = 0; i < len; i++)
        {
            DataFrame frame = null;
            if (continuation)
            {
                frame = new ContinuationFrame();
                continuationCount++;
            }
            else
            {
                frame = new TextFrame();
                textCount++;
            }
            mini = new byte[1];
            mini[0] = msg[i];
            frame.setPayload(ByteBuffer.wrap(mini));
            boolean isLast = (i >= (len - 1));
            frame.setFin(isLast);
            send.add(frame);
            continuation = true;
        }
        send.add(new CloseInfo(StatusCode.NORMAL).asFrame());
View Full Code Here

Examples of org.eclipse.jetty.websocket.common.frames.DataFrame

        int len = msg.length;
        boolean continuation = false;
        byte mini[];
        for (int i = 0; i < len; i++)
        {
            DataFrame frame = null;
            if (continuation)
            {
                frame = new ContinuationFrame();
            }
            else
            {
                frame = new TextFrame();
            }
            mini = new byte[1];
            mini[0] = msg[i];
            frame.setPayload(ByteBuffer.wrap(mini));
            boolean isLast = (i >= (len - 1));
            frame.setFin(isLast);
            frames.add(frame);
            continuation = true;
        }
    }
View Full Code Here

Examples of org.eclipse.jetty.websocket.common.frames.DataFrame

            int remaining = payload.remaining();
            int length = Math.min(remaining, maxLength);
            finished = length == remaining;

            boolean continuation = frame.getType().isContinuation() || !first;
            DataFrame fragment = new DataFrame(frame, continuation);
            boolean fin = frame.isFin() && finished;
            fragment.setFin(fin);

            int limit = payload.limit();
            int newLimit = payload.position() + length;
            payload.limit(newLimit);
            ByteBuffer payloadFragment = payload.slice();
            payload.limit(limit);
            fragment.setPayload(payloadFragment);
            LOG.debug("Fragmented {}->{}", frame, fragment);
            payload.position(newLimit);

            nextOutgoingFrame(fragment, this, entry.batchMode);
        }
View Full Code Here

Examples of org.eclipse.jetty.websocket.common.frames.DataFrame

        return true;
    }

    protected void forwardIncoming(Frame frame, ByteAccumulator accumulator)
    {
        DataFrame newFrame = new DataFrame(frame);
        // Unset RSV1 since it's not compressed anymore.
        newFrame.setRsv1(false);

        ByteBuffer buffer = getBufferPool().acquire(accumulator.getLength(), false);
        try
        {
            BufferUtil.flipToFill(buffer);
            accumulator.transferTo(buffer);
            newFrame.setPayload(buffer);
            nextIncomingFrame(newFrame);
        }
        finally
        {
            getBufferPool().release(buffer);
View Full Code Here

Examples of org.eclipse.jetty.websocket.common.frames.DataFrame

            // Skip the last tail bytes bytes generated by SYNC_FLUSH.
            payload = ByteBuffer.wrap(output, 0, outputLength - TAIL_BYTES.length);
            LOG.debug("Compressed {}: {}->{} chunk bytes", entry, inputLength, outputLength);

            boolean continuation = frame.getType().isContinuation() || !first;
            DataFrame chunk = new DataFrame(frame, continuation);
            chunk.setRsv1(true);
            chunk.setPayload(payload);
            boolean fin = frame.isFin() && finished;
            chunk.setFin(fin);

            nextOutgoingFrame(chunk, this, entry.batchMode);
        }
View Full Code Here

Examples of org.metrapp.dataModel.DataFrame

        af = af1;
    }
   
    public static void main(String[] args) {
       
        DataFrame d = new StringDataFrame();
        RCaller caller = new RCaller();
        RCode code = new RCode();    
        Client client;
       
        DateAlgorithmFactory daf = new DateAlgorithmFactory();
View Full Code Here

Examples of org.metrapp.dataModel.DataFrame

        Controller.getInstance().initializeBasic(caller, code);
       
        loader.loadFile(fileLocation, caller, code);
        File xmlDocument = caller.getParser().getXMLFile();       

        DataFrame df = new StringDataFrame();
        df.createDataFrameAndFillItWithData(xmlDocument);
        Controller.getInstance().updateDataFrame(df);
       
        Filter filter = filterFromClient;
        
        filter.filterData(df, caller, code, null);
View Full Code Here

Examples of org.metrapp.dataModel.DataFrame

            //caller.runAndReturnResult("result2");
        }

        if (status == 3) {
            caller.runAndReturnResult("result");
            DataFrame df = new StringDataFrame();
            File xmlDocument = caller.getParser().getXMLFile();
            df.createDataFrameAndFillItWithData(xmlDocument);
            solarLong = (String) df.getMatrix()[0][0];
        }

        if (status == 4) {
            caller.runOnly();
            plotImage = code.getPlot(plotFile);
//            code.showPlot(plotFile);
            graph = plotFile;
        }

        if (status != 4 && status != 3 && status != 2 && status != 1) {
            DataFrame df = new StringDataFrame();

            File xmlDocument = caller.getParser().getXMLFile();
            df.createDataFrameAndFillItWithData(xmlDocument);
            Controller.getInstance().updateDataFrame(df);
        }

        deleteRCode();
    }
View Full Code Here

Examples of org.springframework.integration.x.ip.serializer.DataFrame

    if (this.streamChecked == null) {
      this.nio = inputStream.getClass().getName().endsWith("TcpNioConnection$ChannelInputStream");
      this.streamAccessor = new DirectFieldAccessor(inputStream);
      this.streamChecked = Boolean.TRUE;
    }
    DataFrame frame = null;
    BasicState state = this.getState(inputStream);
    if (state != null) {
      frame = state.getPendingFrame();
    }
    while (frame == null || (frame.getPayload() == null && frame.getBinary() == null)) {
      frame = doDeserialize(inputStream, frame);
      if (frame.getPayload() == null && frame.getBinary() == null) {
        state.setPendingFrame(frame);
      }
    }
    return frame;
  }
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.