Package io.netty.handler.codec.http2

Examples of io.netty.handler.codec.http2.DefaultHttp2OutboundFlowController$OutboundFlowState$Frame


    }

    @Test
    public void rstStreamFrameShouldMatch() throws Exception {
        bootstrapEnv(1);
        runInChannel(clientChannel, new Http2Runnable() {
            @Override
            public void run() {
                frameWriter.writeRstStream(ctx(), 0x7FFFFFFF, 0xFFFFFFFFL, newPromise());
                ctx().flush();
            }
View Full Code Here


        bootstrapEnv(1);
        final Http2Settings settings = new Http2Settings();
        settings.initialWindowSize(10);
        settings.maxConcurrentStreams(1000);
        settings.headerTableSize(4096);
        runInChannel(clientChannel, new Http2Runnable() {
            @Override
            public void run() {
                frameWriter.writeSettings(ctx(), settings, newPromise());
                ctx().flush();
            }
View Full Code Here

    }

    @Test
    public void windowUpdateFrameShouldMatch() throws Exception {
        bootstrapEnv(1);
        runInChannel(clientChannel, new Http2Runnable() {
            @Override
            public void run() {
                frameWriter.writeWindowUpdate(ctx(), 0x7FFFFFFF, 0x7FFFFFFF, newPromise());
                ctx().flush();
            }
View Full Code Here

            }
        }).when(serverListener).onDataRead(any(ChannelHandlerContext.class), anyInt(), eq(data), eq(0), eq(true));
        try {
            final int expectedFrames = numStreams * 2;
            bootstrapEnv(expectedFrames);
            runInChannel(clientChannel, new Http2Runnable() {
                @Override
                public void run() {
                    for (int i = 1; i < numStreams + 1; ++i) {
                        frameWriter.writeHeaders(ctx(), i, headers, 0, (short) 16, false, 0, false, newPromise());
                        frameWriter.writeData(ctx(), i, data.retain(), 0, true, newPromise());
View Full Code Here

    @Override
    public void initChannel(SocketChannel ch) throws Exception {
        final Http2Connection connection = new DefaultHttp2Connection(false);
        final Http2FrameWriter frameWriter = frameWriter();
        connectionHandler = new Http2ToHttpConnectionHandler(connection,
                frameReader(),
                frameWriter,
                new DefaultHttp2InboundFlowController(connection, frameWriter),
                new DefaultHttp2OutboundFlowController(connection, frameWriter),
                new DelegatingDecompressorFrameListener(connection,
View Full Code Here

      Animation animation) {
    d.printSection(animation.getName());
    d.printKeyValue("DefaultKeyDuration",""+animation.getDefaultKeyDuration());
    Frame[] frames = animation.getFrames();
    for(int fi=0; fi<frames.length; fi++) {
      Frame f = frames[fi];
      d.printKeyValue("KeyData"+(fi+1),f.getName());
      if(f.getKeyDuration()>0)
        d.printKeyValue("KeyDuration"+(fi+1),""+f.getKeyDuration());
    }
    for(int fi=0; fi<frames.length; fi++) {
      Frame f = frames[fi];
      Point offset = f.getOffset();
      if(offset.x!=0 || offset.y!=0) {
        d.printKeyValue("KeyEventName"+(fi+1),"__"+fi);
        d.printKeyValue("__"+fi, "("+offset.x+","+offset.y+",0)");       
      }
    }
View Full Code Here

    return null;
  }

  @Override
  public long getFrameDelay(int index) {
    Frame frame = getFrame(index);
    return (long) (frame.getFinalFrameDuration()*1000);
  }
 
View Full Code Here

        for(Frame frame: animation.getFrames()) {
          paintFrame(g, frame);
        }
      }
      if (selected instanceof Frame) {
        Frame frame = (Frame) selected;
        paintFrame(g,frame);
      }   
    }
    if(freeOffsetStart != null && freeOffsetEnd != null) {
      Point base = toScreen(freeOffsetStart);
View Full Code Here

  private int snap(int snapMe){
    return java.lang.Math.round( snapMe/parent.SnapSlider.getValue() )*parent.SnapSlider.getValue();
  }
 
  @Override public void mouseDragged(MouseEvent e) {
    Frame selected = getSelectedFrame();
    if(selected==null) return;
    if((e.getModifiersEx() & MouseEvent.BUTTON3_DOWN_MASK) == MouseEvent.BUTTON3_DOWN_MASK) {
      if(parent.isSettingOffsetDirectly())
        handleEditOffset(selected,e);     
      if(parent.isSettingOffsetWithRelativePos())
        freeOffsetEnd = getViewPoint(e);
      if(parent.isSettingPivot()) 
        selected.setPivot(new Point(getViewX(e),getViewY(e)));
      if(parent.isRectangleLocked()) {
        int x = snap(getViewX(e)), y = snap(getViewY(e))

        selected.setRectangle(new Rectangle(x,y,parent.lockRectButton.lastRect.width,parent.lockRectButton.lastRect.height));
        selected.setImageFile(editorFrame.getData().getProject().getRelativeFile(imageFile));

        int PivotDX = parent.lockRectButton.lastPivot.x - parent.lockRectButton.lastRect.x;
        int PivotDY = parent.lockRectButton.lastPivot.y - parent.lockRectButton.lastRect.y;
        selected.setPivot(new Point(x+PivotDX,y+PivotDY));
      }
      if(parent.isEditingRectangle()){
       
        Rectangle rect = selected.getRectangle();
        int x = snap(rect.x), y = snap(rect.y);
        int dx = snap(getViewX(e)-x), dy = snap(getViewY(e)-y);
        Rectangle newRectangle = new Rectangle(x,y,dx,dy);
        selected.setRectangle(newRectangle);
        selected.setImageFile(editorFrame.getData().getProject().getRelativeFile(imageFile));
      }
      if(parent.isSettingOffsetWithTemporaryPivot()) {
        if(parent.temporaryPivotOffsetButton.getPivot2()!=null) {
          parent.temporaryPivotOffsetButton.setPivot2(getViewPoint(e));
          selected.setOffset(parent.temporaryPivotOffsetButton.getOffset());
        }
        else
          parent.temporaryPivotOffsetButton.setPivot1(getViewPoint(e));
      }
    }
View Full Code Here

    repaint(20);
  }

  @Override
  public void mousePressed(MouseEvent e) {
    Frame selected  = getSelectedFrame();
    if(selected==null) return;
 
    if(e.getButton() == MouseEvent.BUTTON3) {
      if(parent.isSettingOffsetDirectly()) {
            handleEditOffset(selected, e);
      }
        if (parent.isSettingOffsetWithRelativePos()) {
          freeOffsetStart = getViewPoint(e);
        }
      if(parent.isSettingPivot()) {
        selected.setPivot(new Point(getViewX(e),getViewY(e)));
      }   
      if (parent.isRectangleLocked()) {
        selected.setRectangle(new Rectangle(getViewX(e),getViewY(e),parent.lockRectButton.lastRect.width,parent.lockRectButton.lastRect.height));
        selected.setImageFile(editorFrame.getData().getProject().getRelativeFile(imageFile));
        int PivotDX = parent.lockRectButton.lastPivot.x - parent.lockRectButton.lastRect.x;
        int PivotDY = parent.lockRectButton.lastPivot.y - parent.lockRectButton.lastRect.y;
        selected.setPivot(new Point(getViewX(e)+PivotDX,getViewY(e)+PivotDY));         
      }
      if(parent.isEditingRectangle()) {
        selected.setRectangle(new Rectangle(getViewX(e),getViewY(e),0,0));
        selected.setImageFile(editorFrame.getData().getProject().getRelativeFile(imageFile));
        selected.setPivot(null);
      }
      if(parent.isSettingOffsetWithTemporaryPivot()) {
        if(parent.temporaryPivotOffsetButton.getPivot1()==null) {
          parent.temporaryPivotOffsetButton.setPivot1(getViewPoint(e));
        } else {
          parent.temporaryPivotOffsetButton.setPivot2(getViewPoint(e));
          selected.setOffset(parent.temporaryPivotOffsetButton.getOffset());
        }
      }
    }
    repaint(20);
  }
View Full Code Here

TOP

Related Classes of io.netty.handler.codec.http2.DefaultHttp2OutboundFlowController$OutboundFlowState$Frame

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.