@Test public void testTransmission() throws Exception { Connection connection1 = echo.createLocalConnection(ConnectionMode.SEND_RECV); Connection connection2 = transmittor.createLocalConnection(ConnectionMode.SEND_RECV); connection2.setOtherParty(connection1); Component c = transmittor.getComponent("audio.player"); AudioPlayer player = (AudioPlayer)c; URL url = EchoTest.class.getClassLoader().getResource( "org/mobicents/media/server/impl/addf8-Alaw-GW.wav"); player.setURL(url.toExternalForm()); player.addListener(new PlayerListener()); player.start(); semaphore.tryAcquire(10, TimeUnit.SECONDS); assertTrue("Expected other number of packets", Math.abs(150 - count) < 10); assertEquals(true, echo.isInUse()); assertEquals(true, transmittor.isInUse()); echo.deleteConnection(connection1.getId()); transmittor.deleteConnection(connection2.getId()); assertEquals(false, echo.isInUse()); assertEquals(false, transmittor.isInUse()); }
public void start() { sink.start(); source.start(); }
Echo extends BaseComponent implements ResourceGroup { public void start() { sink.start(); source.start(); } }
Echo extends BaseComponent implements ResourceGroup { public void start() { sink.start(); source.start(); } Echo(String name); }
Echo extends BaseComponent implements ResourceGroup { public void start() { sink.start(); source.start(); } Echo(String name); MediaSink getSink(); MediaSource getSource(); void start(); void stop(); }
Echo extends BaseComponent implements ResourceGroup { public void start() { sink.start(); source.start(); } Echo(String name); MediaSink getSink(); MediaSource getSource(); void start(); void stop();  }