Examples of FrameBuilder


Examples of com.springsource.insight.intercept.trace.FrameBuilder

        }

        @Override
        protected void prepareConnection(HttpURLConnection connection, int contentLength) throws IOException {
            InterceptConfiguration config = InterceptConfiguration.getInstance();
            FrameBuilder builder = config.getFrameBuilder();
            @SuppressWarnings("unchecked")
            List<Color> colors = builder.getHint(Color.TOKEN_NAME, List.class);
            if (colors == null) {
                colors = new ArrayList<Color>();
                builder.setHint(Color.TOKEN_NAME, colors);
            }
            colors.add(new Color(null, getColor(), getClass().getSimpleName(), "prepareConnection"));

            super.prepareConnection(connection, contentLength);
        }
View Full Code Here

Examples of com.springsource.insight.intercept.trace.FrameBuilder

        ;
    }

    @Test
    public void locateEndPointNoGrails() {
        FrameBuilder b = new SimpleFrameBuilder();
        Operation httpOp = new Operation().type(OperationType.HTTP);
        b.enter(httpOp);
        b.enter(new Operation());
        Frame simpleFrame = b.exit();
        assertNotNull("No simple frame", simpleFrame);
        Frame httpFrame = b.exit();
        Trace trace = Trace.newInstance(app, TraceId.valueOf("0"), httpFrame);
        EndPointAnalysis ep = endPointAnalyzer.locateEndPoint(trace);
        assertNull("Unexpected result: " + ep, ep);
    }
View Full Code Here

Examples of com.springsource.insight.intercept.trace.FrameBuilder

        assertNull("Unexpected result: " + ep, ep);
    }

    @Test
    public void locateEndPointNoHttp() {
        FrameBuilder b = new SimpleFrameBuilder();
        b.enter(new Operation());
        b.enter(grailsOp);
        Frame grailsFrame = b.exit();
        assertNotNull("No grails frame", grailsFrame);
        Frame rootFrame = b.exit();
        Trace trace = Trace.newInstance(app, TraceId.valueOf("0"), rootFrame);
        assertEndpointAnalysis(trace, grailsFrame, null);
    }
View Full Code Here

Examples of com.springsource.insight.intercept.trace.FrameBuilder

        assertEndpointAnalysis(trace, grailsFrame, null);
    }

    @Test
    public void locateEndPointHttpComesBeforeGrails() {
        FrameBuilder b = new SimpleFrameBuilder();
        b.enter(grailsOp);
        Operation httpOp = new Operation().type(OperationType.HTTP);
        b.enter(httpOp);
        Frame httpFrame = b.exit();
        assertNotNull("No http frame", httpFrame);
        Frame grailsFrame = b.exit();
        Trace trace = Trace.newInstance(app, TraceId.valueOf("0"), grailsFrame);
        assertEndpointAnalysis(trace, grailsFrame, null);
    }
View Full Code Here

Examples of com.springsource.insight.intercept.trace.FrameBuilder

                .put("siComponentType", beanType)
                .put("beanName", beanName)
                .put("payloadType", "java.lang.String")
                .put("idHeader", "123");

        FrameBuilder b = new SimpleFrameBuilder();
        b.enter(operation);
        b.enter(new Operation());
        Thread.sleep(100);
        b.exit();
        Frame integrationFrame = b.exit();
        Trace trace = Trace.newInstance(app, TraceId.valueOf("0"), integrationFrame);
        EndPointAnalysis endPoint = endPointAnalyzer.locateEndPoint(trace);
        assertEquals(EndPointName.valueOf("MessageChannel#test"), endPoint.getEndPointName());
        assertEquals(integrationFrame.getRange(), trace.getRange());
    }
View Full Code Here

Examples of com.springsource.insight.intercept.trace.FrameBuilder

        assertEndpointAnalysis(trace, grailsFrame, null);
    }

    @Test
    public void locateEndPointHttpComesAfterGrails() {
        FrameBuilder b = new SimpleFrameBuilder();
        Operation httpOp = new Operation().type(OperationType.HTTP);
        b.enter(httpOp);
        b.enter(grailsOp);
        Frame grailsFrame = b.exit();
        assertNotNull("No grails frame", grailsFrame);
        Frame httpFrame = b.exit();
        Trace trace = Trace.newInstance(app, TraceId.valueOf("0"), httpFrame);
        assertEndpointAnalysis(trace, grailsFrame, httpFrame);
    }
View Full Code Here

Examples of com.springsource.insight.intercept.trace.FrameBuilder

                .put("siComponentType", beanType)
                .put("beanName", beanName)
                .put("payloadType", "java.lang.String")
                .put("idHeader", "123");

        FrameBuilder b = new SimpleFrameBuilder();
        b.enter(operation);
        b.enter(new Operation());
        Thread.sleep(100);
        b.exit();
        Frame integrationFrame = b.exit();
        Trace trace = Trace.newInstance(app, TraceId.valueOf("0"), integrationFrame);
        EndPointAnalysis endPoint = endPointAnalyzer.locateEndPoint(trace);
        assertEquals(EndPointName.valueOf("MessageHandler#test"), endPoint.getEndPointName());
        assertEquals(integrationFrame.getRange(), trace.getRange());
    }
View Full Code Here

Examples of org.java_websocket.framing.FrameBuilder

    System.out.println( "Closed: " + code + " " + reason );
  }

  @Override
  public void onWebsocketMessageFragment( WebSocket conn, Framedata frame ) {
    FrameBuilder builder = (FrameBuilder) frame;
    builder.setTransferemasked( true );
    getConnection().sendFrame( frame );
  }
View Full Code Here

Examples of org.java_websocket.framing.FrameBuilder

    conn.send( blob );
  }

  @Override
  public void onWebsocketMessageFragment( WebSocket conn, Framedata frame ) {
    FrameBuilder builder = (FrameBuilder) frame;
    builder.setTransferemasked( false );
    conn.sendFrame( frame );
  }
View Full Code Here

Examples of org.java_websocket.framing.FrameBuilder

      continuousFrameType = Opcode.CONTINUOUS;
    } else {
      continuousFrameType = op;
    }

    FrameBuilder bui = new FramedataImpl1( continuousFrameType );
    try {
      bui.setPayload( buffer );
    } catch ( InvalidDataException e ) {
      throw new RuntimeException( e ); // can only happen when one builds close frames(Opcode.Close)
    }
    bui.setFin( fin );
    if( fin ) {
      continuousFrameType = null;
    } else {
      continuousFrameType = op;
    }
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.