Package com.linkedin.databus2.core.container.request

Examples of com.linkedin.databus2.core.container.request.RegisterResponseEntry


    sourcesResponse.add(new IdNamePair(1L, "source1"));

    Map<Long, List<RegisterResponseEntry>> registerResponse = new HashMap<Long, List<RegisterResponseEntry>>();

    List<RegisterResponseEntry> regResponse = new ArrayList<RegisterResponseEntry>();
    regResponse.add(new RegisterResponseEntry(1L, (short)1, SCHEMA$.toString()));
    registerResponse.put(1L, regResponse);

    ChunkedBodyReadableByteChannel channel = EasyMock.createMock(ChunkedBodyReadableByteChannel.class);

    if ( ! readDataException)
View Full Code Here


  @SuppressWarnings("unchecked")
  private static void initSchemaObjectsLists()
  {
    List<RegisterResponseEntry> sourceSchemasList = new ArrayList<RegisterResponseEntry>();
    sourceSchemasList.add(new RegisterResponseEntry(1L, (short)1, SOURCE1_SCHEMA_STR));
    _sourceObjectsList = (List<Object>)(List<?>)sourceSchemasList;

    List<RegisterResponseEntry> keySchemasList = new ArrayList<RegisterResponseEntry>();
    keySchemasList.add(new RegisterResponseEntry(1L, (short)7, KEY1_SCHEMA_STR));
    _keyObjectsList = (List<Object>)(List<?>)keySchemasList;

    List<RegisterResponseMetadataEntry> metadataSchemasList = new ArrayList<RegisterResponseMetadataEntry>();
    byte[] tbdCrc32 = new byte[DbusEvent.CRC32_DIGEST_LEN];
    final short schemaVersion = 5;
View Full Code Here

  @Test
  public void testRegisterV4HappyPath_V3Response()
  throws IOException, ScnNotFoundException, OffsetNotFoundException
  {
    String responseStr =
        NettyTestUtils.generateRegisterResponse(new RegisterResponseEntry(1L, (short)1, SOURCE1_SCHEMA_STR));
    runRegisterV4("testRegisterV4HappyPath_V3Response",
                  "3",
                  responseStr,
                  TestResponseProcessors.TestConnectionStateMessage.State.REGISTER_SUCCESS);
  }
View Full Code Here

  @Test
  public void testRegisterV4HappyPath_V2Response()
  throws IOException, ScnNotFoundException, OffsetNotFoundException
  {
    String responseStr =
        NettyTestUtils.generateRegisterResponse(new RegisterResponseEntry(1L, (short)1, SOURCE1_SCHEMA_STR));
    runRegisterV4("testRegisterV4HappyPath_V2Response",
                  "2",
                  responseStr,
                  TestResponseProcessors.TestConnectionStateMessage.State.REGISTER_SUCCESS);
  }
View Full Code Here

  public void testRegisterV4UnhappyPath_V4ResponseNotMap()
  throws IOException, ScnNotFoundException, OffsetNotFoundException
  {
    // this generates wrong type for v4:
    String responseStr =
        NettyTestUtils.generateRegisterResponse(new RegisterResponseEntry(1L, (short)1, SOURCE1_SCHEMA_STR));
    runRegisterV4("testRegisterV4UnhappyPath_V4ResponseNotMap",
                  "4",
                  responseStr,
                  TestResponseProcessors.TestConnectionStateMessage.State.REGISTER_RESPONSE_ERROR);
  }
View Full Code Here

    //verify server gets the /register request
    msgReq = captureRequest(objCapture);
    Assert.assertTrue(msgReq.getUri().startsWith("/register"));

    //send back some response
    RegisterResponseEntry entry = new RegisterResponseEntry(1L, (short)1, SOURCE1_SCHEMA_STR);
    String responseStr = NettyTestUtils.generateRegisterResponse(entry);
    body = new DefaultHttpChunk(
        ChannelBuffers.wrappedBuffer(responseStr.getBytes(Charset.defaultCharset())));
    NettyTestUtils.sendServerResponses(_dummyServer, clientAddr, sourcesResp, body);
View Full Code Here

        List<RegisterResponseEntry> l1 = new ArrayList<RegisterResponseEntry>();
        List<RegisterResponseEntry> l2 = new ArrayList<RegisterResponseEntry>();
        List<RegisterResponseEntry> l3 = new ArrayList<RegisterResponseEntry>();

        l1.add(new RegisterResponseEntry(1L, (short)1,SOURCE1_SCHEMA_STR));
        l2.add(new RegisterResponseEntry(2L, (short)1,SOURCE2_SCHEMA_STR));
        l3.add(new RegisterResponseEntry(3L, (short)1,SOURCE3_SCHEMA_STR));

        schemaMap.put(1L, l1);
        schemaMap.put(2L, l2);
        schemaMap.put(3L, l3);
View Full Code Here

        List<RegisterResponseEntry> l1 = new ArrayList<RegisterResponseEntry>();
        List<RegisterResponseEntry> l2 = new ArrayList<RegisterResponseEntry>();
        List<RegisterResponseEntry> l3 = new ArrayList<RegisterResponseEntry>();

        l1.add(new RegisterResponseEntry(1L, (short)1,SOURCE1_SCHEMA_STR));
        l2.add(new RegisterResponseEntry(2L, (short)1,SOURCE2_SCHEMA_STR));
        l3.add(new RegisterResponseEntry(3L, (short)1,SOURCE3_SCHEMA_STR));

        schemaMap.put(1L, l1);
        schemaMap.put(2L, l2);
        schemaMap.put(3L, l3);
View Full Code Here

        List<RegisterResponseEntry> l1 = new ArrayList<RegisterResponseEntry>();
        List<RegisterResponseEntry> l2 = new ArrayList<RegisterResponseEntry>();
        List<RegisterResponseEntry> l3 = new ArrayList<RegisterResponseEntry>();

        l1.add(new RegisterResponseEntry(1L, (short)1,SOURCE1_SCHEMA_STR));
        l2.add(new RegisterResponseEntry(2L, (short)1,SOURCE2_SCHEMA_STR));
        l3.add(new RegisterResponseEntry(3L, (short)1,SOURCE3_SCHEMA_STR));

        schemaMap.put(1L, l1);
        schemaMap.put(2L, l2);
        schemaMap.put(3L, l3);
View Full Code Here

        List<RegisterResponseEntry> l1 = new ArrayList<RegisterResponseEntry>();
        List<RegisterResponseEntry> l2 = new ArrayList<RegisterResponseEntry>();
        List<RegisterResponseEntry> l3 = new ArrayList<RegisterResponseEntry>();

        l1.add(new RegisterResponseEntry(1L, (short)1,SOURCE1_SCHEMA_STR));

        // Not setting the ID for the schema
        RegisterResponseEntry re = new RegisterResponseEntry();
        re.setSchema(SOURCE2_SCHEMA_STR);
        re.setVersion((short)1);
        l2.add(re);

        // Should add the third schema correctly
        l3.add(new RegisterResponseEntry(3L, (short)1,SOURCE3_SCHEMA_STR));

        schemaMap.put(1L, l1);
        schemaMap.put(2L, l2);
        schemaMap.put(3L, l3);
View Full Code Here

TOP

Related Classes of com.linkedin.databus2.core.container.request.RegisterResponseEntry

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.