Examples of DataInfo


Examples of org.eclipse.jetty.spdy.api.DataInfo

        // Send the second chunk of data, must not arrive since we're flow control stalled now
        stream.data(new BytesDataInfo(new byte[size * 2], true), new Callback.Adapter());
        Assert.assertFalse(dataLatch.await(1, TimeUnit.SECONDS));

        // Consume the data arrived to server, this will resume flow control
        DataInfo dataInfo = dataInfoRef.get();
        dataInfo.consume(dataInfo.length());

        Assert.assertTrue(dataLatch.await(5, TimeUnit.SECONDS));
    }
View Full Code Here

Examples of org.eclipse.jetty.spdy.api.DataInfo

                    throw new SPDYException(x);
                }
            }
        });

        DataInfo dataInfo = exchanger.exchange(null, 5, TimeUnit.SECONDS);
        checkThatWeAreFlowControlStalled(exchanger);

        Assert.assertEquals(windowSize, dataInfo.available());
        Assert.assertEquals(0, dataInfo.consumed());
        dataInfo.asByteBuffer(true);

        dataInfo = exchanger.exchange(null, 5, TimeUnit.SECONDS);
        checkThatWeAreFlowControlStalled(exchanger);

        Assert.assertEquals(0, dataInfo.available());
        Assert.assertEquals(0, dataInfo.consumed());
        dataInfo.consume(dataInfo.length());

        dataInfo = exchanger.exchange(null, 5, TimeUnit.SECONDS);
        checkThatWeAreFlowControlStalled(exchanger);

        Assert.assertEquals(dataInfo.length() / 2, dataInfo.consumed());
        dataInfo.asByteBuffer(true);

        dataInfo = exchanger.exchange(null, 5, TimeUnit.SECONDS);
        Assert.assertEquals(dataInfo.length(), dataInfo.consumed());
        // Check that we are not flow control stalled
        dataInfo = exchanger.exchange(null, 5, TimeUnit.SECONDS);
        Assert.assertEquals(dataInfo.length(), dataInfo.consumed());
    }
View Full Code Here

Examples of org.eclipse.jetty.spdy.api.DataInfo

        Stream stream = session.syn(new SynInfo(5, TimeUnit.SECONDS, new Fields(), false, (byte)0), null);
        final int length = 5 * windowSize;
        stream.data(new BytesDataInfo(new byte[length], true), new Callback.Adapter());

        DataInfo dataInfo = exchanger.exchange(null, 5, TimeUnit.SECONDS);
        checkThatWeAreFlowControlStalled(exchanger);

        Assert.assertEquals(windowSize, dataInfo.available());
        Assert.assertEquals(0, dataInfo.consumed());
        dataInfo.asByteBuffer(true);

        dataInfo = exchanger.exchange(null, 5, TimeUnit.SECONDS);
        checkThatWeAreFlowControlStalled(exchanger);

        Assert.assertEquals(0, dataInfo.available());
        Assert.assertEquals(0, dataInfo.consumed());
        dataInfo.consume(dataInfo.length());

        dataInfo = exchanger.exchange(null, 5, TimeUnit.SECONDS);
        checkThatWeAreFlowControlStalled(exchanger);

        Assert.assertEquals(dataInfo.length() / 2, dataInfo.consumed());
        dataInfo.asByteBuffer(true);

        dataInfo = exchanger.exchange(null, 5, TimeUnit.SECONDS);
        Assert.assertEquals(dataInfo.length(), dataInfo.consumed());
        // Check that we are not flow control stalled
        dataInfo = exchanger.exchange(null, 5, TimeUnit.SECONDS);
        Assert.assertEquals(dataInfo.length(), dataInfo.consumed());
    }
View Full Code Here

Examples of org.eclipse.jetty.spdy.api.DataInfo

        session.syn(new SynInfo(5, TimeUnit.SECONDS, new Fields(), true, (byte)0), new StreamFrameListener.Adapter()
        {
            @Override
            public void onData(Stream stream, DataInfo dataInfo)
            {
                DataInfo dataInfo1 = dataInfoRef1.getAndSet(null);
                if (dataInfo1 != null)
                    dataInfo1.consume(dataInfo1.length());
                DataInfo dataInfo2 = dataInfoRef2.getAndSet(null);
                if (dataInfo2 != null)
                    dataInfo2.consume(dataInfo2.length());
                dataInfo.consume(dataInfo.length());
                if (dataInfo.isClose())
                    latch.countDown();
            }
        });
View Full Code Here

Examples of simtools.data.DataInfo

     */
    public TimeStampedDataSource(String label, String id, TimeStampedDataSourceCollection c) throws IOException,
    TimeStampedDataSourceCollection.InvalidFormatException {
        setName(id);
        _collection = c;
        setInfo(new DataInfo(label, id, "", ""));

        setTime(null); // a concrete class is required
        _auxiliaries = new AuxiliaryCollection();
    }
View Full Code Here

Examples of simtools.data.DataInfo

         * @see simtools.data.ValueProvider#getValue(long)
         */
        protected DataInfo info;

        public TimeSource(String name) {
            info = new DataInfo(
                    DataInfo.getLabel(TimeStampedDataSource.this) + "." + name,
                    DataInfo.getId(TimeStampedDataSource.this) + "." + name);
        }
View Full Code Here

Examples of simtools.data.DataInfo

                if (!tfAlias.isEnabled()) {
                    return;
                }
                Object o = filteredSourceTree.getSelectedSourceOrCollection();
                if (o instanceof DataSource) {
                    DataInfo di = ((DataSource) o).getInformation();
                    String alias = tfAlias.getText();
                    if (alias.equals("")) {
                        alias = null;
                    }
                    if (di != null) {
View Full Code Here

Examples of simtools.data.DataInfo

    public double getDoubleValue(int i, long index) throws DataException {
        return ((DataSource) get(i)).getDoubleValue(index);
    }

    public DataInfo getInformation() {
        return new DataInfo(collectionName, ID_MARKER + collectionName, "Asynchronous merge");
    }
View Full Code Here

Examples of simtools.data.DataInfo

       
        /* (non-Javadoc)
         * @see simtools.data.async.StreamingTSDataSourceCollection#getInformation()
         */
        public DataInfo getInformation() {
            DataInfo info = new DataInfo("TestMS", ID_MARKER + "Test");
            return info;
        }
View Full Code Here

Examples of simtools.data.DataInfo

    public RangeSource(String name, double minValue, double maxValue, double step) {
        dminValue = minValue;
        dmaxValue = maxValue;
        dstep = step;
        kind = ValueProvider.DoubleProvider;
        info = new DataInfo(name, ID_PREFIX+name);
        Object[] msgParams = new Object[] {new Double(minValue), new Double(maxValue), new Double(step)};
        info.comment = messages.printNargs("commentDouble", msgParams);
    }
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.