APISonar


org.apache.nifi.remote.protocol.SiteToSiteTransportProtocol.HTTP

> org > apache > nifi > remote > protocol > SiteToSiteTransportProtocol > HTTP
org APIs apache APIs nifi APIs remote APIs protocol APIs SiteToSiteTransportProtocol APIs HTTP APIs

Example 1
public void testSendBatchBySize() throws Exception {

        final SiteToSiteClientConfig siteToSiteClientConfig = new SiteToSiteClient.Builder()
                .requestBatchSize(30)
                .buildConfig();
        setupMock(SiteToSiteTransportProtocol.HTTP, TransferDirection.SEND, siteToSiteClientConfig);

        // t1 = {10, 11, 12}, t2 = {13, 14}
        final int[] expectedNumberOfPackets = {3, 2};
        testSendBatch(expectedNumberOfPackets);

    }
Example 2
public void testNoConfiguration() {
        Properties props = new Properties();
        final NiFiProperties properties = new StandardNiFiProperties(props);
        final PeerDescriptionModifier modifier = new PeerDescriptionModifier(properties);
        assertFalse(modifier.isModificationNeeded(SiteToSiteTransportProtocol.RAW));
        assertFalse(modifier.isModificationNeeded(SiteToSiteTransportProtocol.HTTP));
    }