MediaPipeline mp = pipelineFactory.create();
WebRtcEndpoint webRtcEP1 = mp.newWebRtcEndpoint().build();
HttpGetEndpoint httpEP = mp.newHttpGetEndpoint().terminateOnEOS()
.build();
Dispatcher dispatcher = mp.newDispatcher().build();
HubPort hubPort1 = dispatcher.newHubPort().build();
HubPort hubPort2 = dispatcher.newHubPort().build();
webRtcEP1.connect(hubPort1);
hubPort2.connect(httpEP);