@Test public void testSocketPeerConnector() throws Exception { final String portIdentifier = "abcd"; final ServerSocket serverSocket = new ServerSocket(0); final SiteToSiteClientConfig siteToSiteClientConfig = new SiteToSiteClientConfig(); siteToSiteClientConfig.setPortIdentifier(portIdentifier); final Peer peer = new Peer("localhost", 0, serverSocket.getLocalPort(), false, 0); final Future<Exception> future = startServer(serverSocket, peer, siteToSiteClientConfig, true); SocketPeerConnector connector = new SocketPeerConnector(peer, siteToSiteClientConfig, new SiteToSiteRemoteCluster()); SocketPeerConnection socketPeerConnection = connector.openConnection(true); Exception exception = future.get(); if (exception != null) { throw exception; } assertEquals(6, socketPeerConnection.getFlowFileProtocolVersion()); assertEquals(1, (int) socketPeerConnection.getFlowFileCodecVersion()); }
public SocketPeerConnector(Peer peer, SiteToSiteClientConfig siteToSiteClientConfig, SiteToSiteRemoteCluster siteToSiteRemoteCluster) { this.peer = peer; this.siteToSiteClientConfig = siteToSiteClientConfig; this.siteToSiteRemoteCluster = siteToSiteRemoteCluster; }
SocketPeerConnector { public SocketPeerConnector(Peer peer, SiteToSiteClientConfig siteToSiteClientConfig, SiteToSiteRemoteCluster siteToSiteRemoteCluster) { this.peer = peer; this.siteToSiteClientConfig = siteToSiteClientConfig; this.siteToSiteRemoteCluster = siteToSiteRemoteCluster; } }
SocketPeerConnector { public SocketPeerConnector(Peer peer, SiteToSiteClientConfig siteToSiteClientConfig, SiteToSiteRemoteCluster siteToSiteRemoteCluster) { this.peer = peer; this.siteToSiteClientConfig = siteToSiteClientConfig; this.siteToSiteRemoteCluster = siteToSiteRemoteCluster; } SocketPeerConnector(Peer peer, SiteToSiteClientConfig siteToSiteClientConfig, SiteToSiteRemoteCluster siteToSiteRemoteCluster); }
SocketPeerConnector { public SocketPeerConnector(Peer peer, SiteToSiteClientConfig siteToSiteClientConfig, SiteToSiteRemoteCluster siteToSiteRemoteCluster) { this.peer = peer; this.siteToSiteClientConfig = siteToSiteClientConfig; this.siteToSiteRemoteCluster = siteToSiteRemoteCluster; } SocketPeerConnector(Peer peer, SiteToSiteClientConfig siteToSiteClientConfig, SiteToSiteRemoteCluster siteToSiteRemoteCluster); SocketPeerConnection openConnection(boolean negotiateCodec); }
SocketPeerConnector { public SocketPeerConnector(Peer peer, SiteToSiteClientConfig siteToSiteClientConfig, SiteToSiteRemoteCluster siteToSiteRemoteCluster) { this.peer = peer; this.siteToSiteClientConfig = siteToSiteClientConfig; this.siteToSiteRemoteCluster = siteToSiteRemoteCluster; } SocketPeerConnector(Peer peer, SiteToSiteClientConfig siteToSiteClientConfig, SiteToSiteRemoteCluster siteToSiteRemoteCluster); SocketPeerConnection openConnection(boolean negotiateCodec); static final byte[] MAGIC_BYTES; static final int RESOURCE_OK; static final int DIFFERENT_RESOURCE_VERSION; static final int ABORT; static final String SOCKET_FLOW_FILE_PROTOCOL; static final String GZIP; static final String PORT_IDENTIFIER; static final String REQUEST_EXPIRATION_MILLIS; static final String BATCH_COUNT; static final String BATCH_SIZE; static final String BATCH_DURATION; static final String STANDARD_FLOW_FILE_CODEC; }