├── .gitignore ├── LICENSE ├── NOTICE ├── README.md ├── bin └── set-versions.sh ├── kurento-assembly ├── LICENSE ├── NOTICE ├── README.md ├── pom.xml └── src │ └── build │ └── assembly.xml ├── kurento-basicroom ├── LICENSE ├── NOTICE ├── README.md ├── package │ ├── README.md │ ├── bin │ │ ├── install.sh │ │ └── start.sh │ ├── config │ │ └── room-server.conf.json │ └── support-files │ │ └── kurento-room-server.sh ├── pom.xml └── src │ ├── assembly │ └── bin.xml │ ├── main │ ├── java │ │ └── org │ │ │ └── kurento │ │ │ └── basicroom │ │ │ ├── KurentoRoomServerApp.java │ │ │ ├── Room.java │ │ │ ├── RoomHandler.java │ │ │ ├── RoomManager.java │ │ │ └── RoomParticipant.java │ └── resources │ │ ├── banner.txt │ │ └── static │ │ ├── index.html │ │ ├── js │ │ ├── EventEmitter.js │ │ ├── KurentoRoom.js │ │ ├── adapter.js │ │ ├── console.js │ │ ├── demo.js │ │ └── kurento-utils.js │ │ └── style.css │ └── test │ └── resources │ └── basic-kurento-room.conf.json ├── kurento-client ├── LICENSE ├── NOTICE ├── README.md ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── kurento │ │ │ └── client │ │ │ ├── AbstractBuilder.java │ │ │ ├── Continuation.java │ │ │ ├── Event.java │ │ │ ├── EventListener.java │ │ │ ├── GenericMediaElement.java │ │ │ ├── GenericMediaEvent.java │ │ │ ├── Handler.java │ │ │ ├── JsonRpcConnectionListenerKurento.java │ │ │ ├── KurentoClient.java │ │ │ ├── KurentoClientBuilder.java │ │ │ ├── KurentoConnectionListener.java │ │ │ ├── KurentoObject.java │ │ │ ├── ListenerSubscription.java │ │ │ ├── Properties.java │ │ │ ├── ReconnectedHandler.java │ │ │ ├── TFuture.java │ │ │ ├── Transaction.java │ │ │ ├── TransactionException.java │ │ │ ├── TransactionExecutionException.java │ │ │ ├── TransactionNotCommitedException.java │ │ │ ├── TransactionNotExecutedException.java │ │ │ ├── TransactionRollbackException.java │ │ │ └── internal │ │ │ ├── KmsProvider.java │ │ │ ├── KmsUrlLoader.java │ │ │ ├── ModuleName.java │ │ │ ├── NotEnoughResourcesException.java │ │ │ ├── ParamAnnotationUtils.java │ │ │ ├── RemoteClass.java │ │ │ ├── TFutureImpl.java │ │ │ ├── TransactionImpl.java │ │ │ ├── client │ │ │ ├── DefaultContinuation.java │ │ │ ├── DefaultInvocationHandler.java │ │ │ ├── ErrorLogContinuation.java │ │ │ ├── ListenerSubscriptionImpl.java │ │ │ ├── RemoteObject.java │ │ │ ├── RemoteObjectEventListener.java │ │ │ ├── RemoteObjectFactory.java │ │ │ ├── RemoteObjectInvocationHandler.java │ │ │ ├── RomClient.java │ │ │ ├── RomClientObjectManager.java │ │ │ ├── RomEventHandler.java │ │ │ ├── RomManager.java │ │ │ └── operation │ │ │ │ ├── InvokeOperation.java │ │ │ │ ├── MediaObjectCreationOperation.java │ │ │ │ ├── Operation.java │ │ │ │ ├── ReleaseOperation.java │ │ │ │ ├── SubscriptionOperation.java │ │ │ │ └── UnsubscriptionOperation.java │ │ │ ├── server │ │ │ ├── EventSubscription.java │ │ │ ├── KurentoServerException.java │ │ │ ├── KurentoServerTransportException.java │ │ │ ├── Param.java │ │ │ ├── ProtocolException.java │ │ │ ├── RemoteObjectManager.java │ │ │ └── RomServer.java │ │ │ └── transport │ │ │ ├── jsonrpc │ │ │ ├── JsonResponseUtils.java │ │ │ ├── RomClientJsonRpcClient.java │ │ │ ├── RomJsonRpcConstants.java │ │ │ └── RomServerJsonRpcHandler.java │ │ │ └── serialization │ │ │ ├── ModuleClassesManager.java │ │ │ ├── ObjectRefsManager.java │ │ │ └── ParamsFlattener.java │ ├── kmd │ │ └── .keep │ └── resources │ │ └── templates │ │ ├── complexType_class_java.ftl │ │ ├── config.json │ │ ├── event_impl_java.ftl │ │ ├── macros.ftm │ │ ├── model_moduleInfo_class_java.ftl │ │ └── remoteClass_interface_java.ftl │ └── test │ ├── java │ └── org │ │ └── kurento │ │ ├── client │ │ └── internal │ │ │ └── test │ │ │ ├── AbstractRomTest.java │ │ │ ├── ConstructionTest.java │ │ │ ├── KmsUrlServiceLoaderTest.java │ │ │ ├── LocalRomTest.java │ │ │ ├── ReturnReferencesTest.java │ │ │ ├── RomClientWeakRemoteObjects.java │ │ │ ├── RomInterfaceImplTest.java │ │ │ ├── RomJsonConverterTest.java │ │ │ ├── SyncConstMethodsTest.java │ │ │ ├── WebSocketRomTest.java │ │ │ └── model │ │ │ ├── Sample2.java │ │ │ ├── Sample2Impl.java │ │ │ ├── SampleRemoteClass.java │ │ │ ├── SampleRemoteClassImpl.java │ │ │ ├── client │ │ │ ├── ComplexParam.java │ │ │ ├── MediaServerFactory.java │ │ │ ├── SampleClass.java │ │ │ ├── SampleEnum.java │ │ │ └── events │ │ │ │ ├── BaseEvent.java │ │ │ │ └── SampleEvent.java │ │ │ └── server │ │ │ └── SampleClassImpl.java │ │ └── module │ │ └── ComplexParamModuleInfo.java │ └── resources │ ├── config-test.properties │ ├── config.json │ ├── invalid-config.properties │ ├── provider-config.properties │ └── test_model.json ├── kurento-commons ├── LICENSE ├── NOTICE ├── README.md ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── kurento │ │ │ └── commons │ │ │ ├── Address.java │ │ │ ├── BasicJsonUtils.java │ │ │ ├── ClassPath.java │ │ │ ├── ConfigFileFinder.java │ │ │ ├── ConfigFileManager.java │ │ │ ├── ConfigFileObject.java │ │ │ ├── ConfigFilePropertyHolder.java │ │ │ ├── PropertiesManager.java │ │ │ ├── SecretGenerator.java │ │ │ ├── ThreadFactoryCreator.java │ │ │ ├── TimeoutReentrantLock.java │ │ │ ├── TimeoutRuntimeException.java │ │ │ ├── UrlServiceLoader.java │ │ │ ├── exception │ │ │ ├── Assert.java │ │ │ └── KurentoException.java │ │ │ ├── net │ │ │ └── RemoteService.java │ │ │ └── testing │ │ │ ├── IntegrationTests.java │ │ │ ├── JsonRpcConnectorTests.java │ │ │ ├── KurentoClientTests.java │ │ │ ├── KurentoControlServerTests.java │ │ │ ├── KurentoTreeTests.java │ │ │ ├── RepositoryApiTests.java │ │ │ ├── SanityTests.java │ │ │ ├── SystemCompatibilityTests.java │ │ │ ├── SystemFunctionalTests.java │ │ │ ├── SystemPerformanceTests.java │ │ │ ├── SystemQualityTests.java │ │ │ ├── SystemScalabilityTests.java │ │ │ ├── SystemStabilityTests.java │ │ │ └── SystemTests.java │ └── resources │ │ └── kurento-error-codes.properties │ └── test │ ├── java │ └── org │ │ └── kurento │ │ └── commons │ │ └── test │ │ └── ConfigFileTest.java │ └── resources │ └── test.conf.json ├── kurento-integration-tests ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.m2e.core.prefs ├── LICENSE ├── NOTICE ├── README.md ├── kurento-benchmark │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── keystore.jks │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── App.java │ │ └── test │ │ └── java │ │ └── org │ │ └── kurento │ │ └── test │ │ └── benchmark │ │ └── AgnosticBenchmarkTest.java ├── kurento-client-test │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── App.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── kurento │ │ │ └── client │ │ │ └── test │ │ │ ├── ApiBase.java │ │ │ ├── BasicPipelineTest.java │ │ │ ├── ConnectionListenerTest.java │ │ │ ├── FaceOverlayFilterAsyncTest.java │ │ │ ├── FaceOverlayFilterTest.java │ │ │ ├── GStreamerFilterAsyncTest.java │ │ │ ├── GStreamerFilterTest.java │ │ │ ├── KurentoClientKmsConnectionTest.java │ │ │ ├── KurentoClientKmsProviderTest.java │ │ │ ├── MediaPipelineAsyncBaseTest.java │ │ │ ├── PlayerEndpointAsyncTest.java │ │ │ ├── PlayerEndpointTest.java │ │ │ ├── RecorderEndpointAsyncTest.java │ │ │ ├── RecorderEndpointTest.java │ │ │ ├── RtpEndpointAsync2Test.java │ │ │ ├── RtpEndpointAsyncTest.java │ │ │ ├── RtpEndpointTest.java │ │ │ ├── ServerManagerTest.java │ │ │ ├── TransactionTest.java │ │ │ ├── WebRtcEndpointAsyncTest.java │ │ │ ├── WebRtcEndpointTest.java │ │ │ ├── WebSocketClientToKmsConnectionTest.java │ │ │ ├── ZBarFilterTest.java │ │ │ └── util │ │ │ ├── AsyncEventManager.java │ │ │ ├── AsyncManager.java │ │ │ ├── AsyncResultManager.java │ │ │ ├── MediaPipelineBaseTest.java │ │ │ ├── SdpAsyncBaseTest.java │ │ │ └── SdpBaseTest.java │ │ └── resources │ │ ├── log4j.properties │ │ └── logback.xml ├── kurento-jsonrpc-test │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── App.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── kurento │ │ │ └── jsonrpc │ │ │ └── test │ │ │ ├── AsyncServerTest.java │ │ │ ├── BasicAsyncClientEchoTest.java │ │ │ ├── BasicEchoTest.java │ │ │ ├── BidirectionalMultiTest.java │ │ │ ├── BidirectionalTest.java │ │ │ ├── ClientEventsTest.java │ │ │ ├── CloseMessageTest.java │ │ │ ├── CloseSessionTest.java │ │ │ ├── ConnectionListenerTest.java │ │ │ ├── ErrorServerTest.java │ │ │ ├── JsonRpcClientConnectTest.java │ │ │ ├── LargePackageTest.java │ │ │ ├── MaxWsConnectionsTest.java │ │ │ ├── MultipleSessionsTest.java │ │ │ ├── NewSessionTest.java │ │ │ ├── NotificationTest.java │ │ │ ├── PingPongTest.java │ │ │ ├── ReconnectionFromServerTest.java │ │ │ ├── ReconnectionTest.java │ │ │ ├── ServerEventsTest.java │ │ │ ├── base │ │ │ ├── BootTestApplication.java │ │ │ ├── DemoBean.java │ │ │ └── JsonRpcConnectorBaseTest.java │ │ │ ├── handler │ │ │ └── EchoJsonRpcHandler.java │ │ │ └── util │ │ │ ├── EventWaiter.java │ │ │ └── ValueEventWaiter.java │ │ └── resources │ │ └── log4j.properties ├── kurento-repository-test │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── pom.xml │ ├── repository │ │ └── metadata │ │ │ └── metadata.json │ ├── src │ │ ├── main │ │ │ ├── java │ │ │ │ └── org │ │ │ │ │ └── kurento │ │ │ │ │ └── repository │ │ │ │ │ └── OneRecordingServer.java │ │ │ └── resources │ │ │ │ └── logback.xml │ │ └── test │ │ │ └── java │ │ │ └── org │ │ │ └── kurento │ │ │ └── repository │ │ │ └── test │ │ │ ├── ErrorEventsTest.java │ │ │ ├── FilenameAsIdTest.java │ │ │ ├── ItemManagmentTest.java │ │ │ ├── ItemsMetadataTest.java │ │ │ ├── OneRecordingServerTest.java │ │ │ ├── PlayerEventsTest.java │ │ │ ├── RangeGetTest.java │ │ │ ├── RangePutTest.java │ │ │ ├── RepositoryItemsTest.java │ │ │ ├── RepositoryRestTest.java │ │ │ ├── TimeoutTests.java │ │ │ └── util │ │ │ ├── BaseRepositoryTest.java │ │ │ └── TestUtils.java │ └── test-files │ │ ├── logo.png │ │ ├── sample.txt │ │ └── sampleDownload.txt ├── kurento-sanity-test │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── keystore.jks │ ├── pom.xml │ └── src │ │ ├── main │ │ └── resources │ │ │ ├── static │ │ │ └── index.html │ │ │ └── templates │ │ │ └── kurento-client.html.ftl │ │ └── test │ │ └── java │ │ └── org │ │ └── kurento │ │ └── test │ │ └── sanity │ │ ├── KurentoJsBase.java │ │ ├── KurentoJsBowerTest.java │ │ ├── KurentoJsReleaseTest.java │ │ └── PipelineTest.java ├── kurento-test │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── kurento │ │ │ │ └── test │ │ │ │ ├── base │ │ │ │ ├── BaseTest.java │ │ │ │ ├── BrowserTest.java │ │ │ │ ├── CompatibilityTest.java │ │ │ │ ├── FunctionalTest.java │ │ │ │ ├── KurentoClientBrowserTest.java │ │ │ │ ├── KurentoClientTest.java │ │ │ │ ├── KurentoTest.java │ │ │ │ ├── PerformanceTest.java │ │ │ │ ├── PlayerTest.java │ │ │ │ ├── QualityTest.java │ │ │ │ ├── ScalabilityTest.java │ │ │ │ ├── StabilityTest.java │ │ │ │ └── repository │ │ │ │ │ ├── RepositoryFunctionalTest.java │ │ │ │ │ └── RepositoryMongoTest.java │ │ │ │ ├── browser │ │ │ │ ├── Browser.java │ │ │ │ ├── BrowserEventListener.java │ │ │ │ ├── BrowserRunner.java │ │ │ │ ├── BrowserType.java │ │ │ │ ├── ConsoleLogLevel.java │ │ │ │ ├── DockerBrowserManager.java │ │ │ │ ├── FakeCam.java │ │ │ │ ├── SdpOfferProcessor.java │ │ │ │ ├── WebPage.java │ │ │ │ ├── WebPageType.java │ │ │ │ ├── WebRtcCandidateType.java │ │ │ │ ├── WebRtcChannel.java │ │ │ │ ├── WebRtcIpvMode.java │ │ │ │ ├── WebRtcMode.java │ │ │ │ └── WebRtcTestPage.java │ │ │ │ ├── config │ │ │ │ ├── AudioChannel.java │ │ │ │ ├── BrowserConfig.java │ │ │ │ ├── BrowserInstance.java │ │ │ │ ├── BrowserScope.java │ │ │ │ ├── Protocol.java │ │ │ │ ├── Retry.java │ │ │ │ ├── TestConfiguration.java │ │ │ │ ├── TestReport.java │ │ │ │ ├── TestScenario.java │ │ │ │ └── VideoFormat.java │ │ │ │ ├── docker │ │ │ │ ├── Docker.java │ │ │ │ ├── FirstObjectResultCallback.java │ │ │ │ └── TransportMode.java │ │ │ │ ├── grid │ │ │ │ ├── GridHandler.java │ │ │ │ ├── GridHub.java │ │ │ │ ├── GridNode.java │ │ │ │ └── ParallelBrowsers.java │ │ │ │ ├── internal │ │ │ │ ├── AbortableCountDownLatch.java │ │ │ │ ├── CheckNodes.java │ │ │ │ ├── GetNodeList.java │ │ │ │ ├── KillActiveProcesses.java │ │ │ │ ├── KillAllProcesses.java │ │ │ │ ├── KillProcesses.java │ │ │ │ └── StartHub.java │ │ │ │ ├── latency │ │ │ │ ├── ChangeColorEvent.java │ │ │ │ ├── ChangeColorEventListener.java │ │ │ │ ├── ChangeColorObservable.java │ │ │ │ ├── ChartWriter.java │ │ │ │ ├── ColorTrigger.java │ │ │ │ ├── LatencyController.java │ │ │ │ ├── LatencyException.java │ │ │ │ ├── LatencyRegistry.java │ │ │ │ ├── VideoTag.java │ │ │ │ └── VideoTagType.java │ │ │ │ ├── lifecycle │ │ │ │ ├── FailedTest.java │ │ │ │ ├── FinishedTest.java │ │ │ │ ├── FinishedTestClass.java │ │ │ │ ├── KurentoBlockJUnit4ClassRunnerWithParameters.java │ │ │ │ ├── KurentoBlockJUnit4ClassRunnerWithParametersFactory.java │ │ │ │ ├── KurentoRunNotifier.java │ │ │ │ ├── KurentoTestListener.java │ │ │ │ ├── KurentoTestRunner.java │ │ │ │ ├── KurentoTestWatcher.java │ │ │ │ ├── StartedTest.java │ │ │ │ ├── StartedTestClass.java │ │ │ │ └── SucceededTest.java │ │ │ │ ├── mediainfo │ │ │ │ ├── AssertMedia.java │ │ │ │ ├── MediaInfo.java │ │ │ │ └── MediaInfoLibrary.java │ │ │ │ ├── monitor │ │ │ │ ├── KmsDockerMonitor.java │ │ │ │ ├── KmsLocalMonitor.java │ │ │ │ ├── KmsMonitor.java │ │ │ │ ├── KmsSystemInfo.java │ │ │ │ ├── MonitorSample.java │ │ │ │ ├── MonitorSampleRegistrer.java │ │ │ │ ├── MonitorStats.java │ │ │ │ ├── NetInfo.java │ │ │ │ ├── PeerConnectionStats.java │ │ │ │ ├── SystemMonitorManager.java │ │ │ │ ├── WebRtcClient.java │ │ │ │ ├── WebRtcEndpointStats.java │ │ │ │ └── WebRtcStats.java │ │ │ │ ├── sdp │ │ │ │ └── SdpUtils.java │ │ │ │ ├── services │ │ │ │ ├── FakeKmsService.java │ │ │ │ ├── KmsService.java │ │ │ │ ├── Service.java │ │ │ │ ├── TestService.java │ │ │ │ └── WebServerService.java │ │ │ │ └── utils │ │ │ │ ├── CheckAudioTimerTask.java │ │ │ │ ├── EventWaiter.java │ │ │ │ ├── Ffmpeg.java │ │ │ │ ├── JMeterClient.java │ │ │ │ ├── Randomizer.java │ │ │ │ ├── Shell.java │ │ │ │ ├── SshConnection.java │ │ │ │ ├── ValueEventWaiter.java │ │ │ │ └── WebRtcConnector.java │ │ └── resources │ │ │ ├── application.properties │ │ │ ├── default.conf.json │ │ │ ├── keystore.jks │ │ │ ├── log4j.properties │ │ │ ├── logback.xml │ │ │ ├── node-list.txt │ │ │ ├── static │ │ │ ├── img │ │ │ │ ├── html5.png │ │ │ │ ├── spinner.gif │ │ │ │ ├── transparent-1px.png │ │ │ │ └── webrtc.png │ │ │ ├── lib │ │ │ │ ├── Console.js │ │ │ │ ├── kurento-test.js │ │ │ │ ├── kurento-test.min.js │ │ │ │ └── webrtc.js │ │ │ ├── player.html │ │ │ └── webrtc.html │ │ │ └── templates │ │ │ ├── kurento.conf.json.ftl │ │ │ ├── kurento.sh.ftl │ │ │ └── launch-node.sh.ftl │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── kurento │ │ │ └── test │ │ │ ├── BrowserLogTest.java │ │ │ ├── docker │ │ │ └── DockerTest.java │ │ │ ├── functional │ │ │ ├── agnostic │ │ │ │ └── AgnosticRtpEndpointToWebRtcWithFfmpegTest.java │ │ │ ├── alphablending │ │ │ │ ├── AlphaBlendingPlayerTest.java │ │ │ │ └── AlphaBlendingWebRtcTest.java │ │ │ ├── composite │ │ │ │ ├── CompositeAudioRecorderTest.java │ │ │ │ ├── CompositePlayerTest.java │ │ │ │ ├── CompositeRecorderTest.java │ │ │ │ ├── CompositeWebRtcRecorderTest.java │ │ │ │ ├── CompositeWebRtcTest.java │ │ │ │ └── CompositeWebRtcUsersTest.java │ │ │ ├── data │ │ │ │ └── EventTagTest.java │ │ │ ├── datachannels │ │ │ │ └── DatachannelsB2BTest.java │ │ │ ├── dispatcher │ │ │ │ ├── DispatcherPlayerTest.java │ │ │ │ └── DispatcherWebRtcTest.java │ │ │ ├── dispatcheronetomany │ │ │ │ ├── DispatcherOneToManyPlayerTest.java │ │ │ │ └── DispatcherOneToManyWebRtcTest.java │ │ │ ├── ice │ │ │ │ ├── IceIpv4BrowserRelayKmsDnatSeleniumDnatTest.java │ │ │ │ ├── IceIpv4HostKmsBridgeSeleniumBridgeTest.java │ │ │ │ ├── IceIpv4KmsRelayKmsDnatSeleniumDnatTest.java │ │ │ │ ├── IceIpv4ReflexiveKmsBridgeSeleniumDnatTest.java │ │ │ │ ├── IceIpv4ReflexiveKmsDnatSeleniumBridgeTest.java │ │ │ │ ├── IceIpv4ReflexiveKmsDnatSeleniumDnatTest.java │ │ │ │ ├── IceIpv6HostKmsBridgeSeleniumBridgeTest.java │ │ │ │ └── SimpleIceTest.java │ │ │ ├── player │ │ │ │ ├── FunctionalPlayerTest.java │ │ │ │ ├── PlayerAudioVideoTrackPauseTest.java │ │ │ │ ├── PlayerAudioVideoTrackSeekTest.java │ │ │ │ ├── PlayerEndTest.java │ │ │ │ ├── PlayerFaceOverlayTest.java │ │ │ │ ├── PlayerOnlyAudioTrackPauseTest.java │ │ │ │ ├── PlayerOnlyAudioTrackSeekTest.java │ │ │ │ ├── PlayerOnlyAudioTrackTest.java │ │ │ │ ├── PlayerOnlyVideoTrackPauseTest.java │ │ │ │ ├── PlayerOnlyVideoTrackSeekTest.java │ │ │ │ ├── PlayerOnlyVideoTrackTest.java │ │ │ │ ├── PlayerSwitchTest.java │ │ │ │ ├── PlayerWebRtcTest.java │ │ │ │ ├── PlayerZBarTest.java │ │ │ │ └── SimplePlayer.java │ │ │ ├── recorder │ │ │ │ ├── BaseRecorder.java │ │ │ │ ├── RecorderFaceOverlayTest.java │ │ │ │ ├── RecorderMultiSlashesDirectoryTest.java │ │ │ │ ├── RecorderNonExistingDirectoryTest.java │ │ │ │ ├── RecorderPipelineDestroyTest.java │ │ │ │ ├── RecorderPlayerDisconnectTest.java │ │ │ │ ├── RecorderPlayerTest.java │ │ │ │ ├── RecorderStopTest.java │ │ │ │ ├── RecorderSwitchPlayerTest.java │ │ │ │ ├── RecorderSwitchPlayerWebRtcTest.java │ │ │ │ ├── RecorderSwitchPlayerWithPassThroughTest.java │ │ │ │ ├── RecorderSwitchWebRtcWebRtcAndPlayerTest.java │ │ │ │ ├── RecorderSwitchWebRtcWebRtcPlayerWithPassThroughTest.java │ │ │ │ ├── RecorderSwitchWebrtcTest.java │ │ │ │ ├── RecorderWebRtcDisconnectTest.java │ │ │ │ └── RecorderWebRtcTest.java │ │ │ ├── repository │ │ │ │ └── RepositoryRecorderTest.java │ │ │ └── webrtc │ │ │ │ ├── WebRtcFakeMediaTest.java │ │ │ │ ├── WebRtcFourOneToManyTest.java │ │ │ │ ├── WebRtcOneFaceOverlayTest.java │ │ │ │ ├── WebRtcOneLoopbackTest.java │ │ │ │ ├── WebRtcOneToOneTest.java │ │ │ │ └── WebRtcThreeSwitchTest.java │ │ │ ├── longstability │ │ │ ├── LongStabilityCheckMemoryTest.java │ │ │ └── LongStabilityRecorderS3Test.java │ │ │ ├── metatest │ │ │ ├── BrowserCreationTest.java │ │ │ ├── MetaTest1Test.java │ │ │ ├── MetaTest2Test.java │ │ │ └── MetaTestMountedVolumeTest.java │ │ │ ├── performance │ │ │ ├── kms │ │ │ │ └── KmsPerformanceTest.java │ │ │ └── webrtc │ │ │ │ ├── WebRtcPerformanceLoopbackTest.java │ │ │ │ └── WebRtcPerformanceOneToManyTest.java │ │ │ ├── quality │ │ │ └── webrtc │ │ │ │ └── WebRtcQualityLoopbackTest.java │ │ │ ├── scalability │ │ │ └── webrtc │ │ │ │ └── WebRtcScalabilityLatencyTest.java │ │ │ └── stability │ │ │ ├── pipeline │ │ │ ├── BasePipeline.java │ │ │ ├── PipelineStabilityConnectDisconnectPassthroughChainedTest.java │ │ │ ├── PipelineStabilityConnectDisconnectPassthroughOneToManyTest.java │ │ │ ├── PipelineStabilityConnectDisconnectWebRtcAndPassthroughChainedLoopbackTest.java │ │ │ ├── PipelineStabilityConnectDisconnectWebRtcAndPassthroughChainedTest.java │ │ │ ├── PipelineStabilityConnectDisconnectWebRtcAndPassthroughOneToManyParallelTest.java │ │ │ ├── PipelineStabilityConnectDisconnectWebRtcAndPassthroughOneToManyTest.java │ │ │ ├── PipelineStabilityCreateDestroyPipelinesTest.java │ │ │ ├── PipelineStabilityCreateDestroyWebRtcAndEstablishConnectionTest.java │ │ │ ├── PipelineStabilityCreateDestroyWebRtcGenerateAndProcessOfferTest.java │ │ │ ├── PipelineStabilityCreateDestroyWebRtcGenerateOfferTest.java │ │ │ ├── PipelineStabilityCreateDestroyWebRtcGenerateProcessOfferAndAnswerTest.java │ │ │ └── PipelineStabilityCreateDestroyWebRtcTest.java │ │ │ ├── player │ │ │ ├── PlayerMultipleAudioVideoTrackSeekTest.java │ │ │ ├── PlayerMultipleOnlyAudioTrackSeekTest.java │ │ │ ├── PlayerMultipleOnlyVideoTrackSeekTest.java │ │ │ ├── PlayerMultiplePauseTest.java │ │ │ ├── PlayerMultiplePlayTest.java │ │ │ └── PlayerWithFilterAndWebRtcTest.java │ │ │ ├── recorder │ │ │ ├── RecorderPlayerOneToManyTest.java │ │ │ ├── RecorderPlayerSwitchSequentialTest.java │ │ │ ├── RecorderThreeWebRtcSimultaneous.java │ │ │ ├── RecorderWebRtcAudioVideoAndWebRtcOnlyAudioSimultaneous.java │ │ │ ├── RecorderWebRtcLongFileTest.java │ │ │ ├── RecorderWebRtcOneToManyTest.java │ │ │ ├── RecorderWebRtcShortFileTest.java │ │ │ └── RecorderWebRtcSwitchSequentialTest.java │ │ │ └── webrtc │ │ │ ├── WebRtcStabilityBack2BackTest.java │ │ │ ├── WebRtcStabilityLoopbackTest.java │ │ │ ├── WebRtcStabilityRtpH264Test.java │ │ │ ├── WebRtcStabilitySwitchRtpH264Test.java │ │ │ └── WebRtcStabilitySwitchTest.java │ │ └── resources │ │ └── jmeter │ │ ├── bin │ │ ├── jmeter-results-detail.xsl │ │ ├── jmeter.properties │ │ ├── saveservice.properties │ │ └── upgrade.properties │ │ └── player.jmx.ftl └── pom.xml ├── kurento-jsonrpc ├── README.md ├── kurento-jsonrpc-client-jetty │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── kurento │ │ └── jsonrpc │ │ └── client │ │ └── JsonRpcClientWebSocket.java ├── kurento-jsonrpc-client │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── kurento │ │ │ └── jsonrpc │ │ │ ├── DefaultJsonRpcHandler.java │ │ │ ├── JsonRpcAndJavaMethodManager.java │ │ │ ├── JsonRpcClientClosedException.java │ │ │ ├── JsonRpcErrorException.java │ │ │ ├── JsonRpcException.java │ │ │ ├── JsonRpcHandler.java │ │ │ ├── JsonRpcMethod.java │ │ │ ├── JsonUtils.java │ │ │ ├── Prop.java │ │ │ ├── PropImpl.java │ │ │ ├── Props.java │ │ │ ├── Session.java │ │ │ ├── Transaction.java │ │ │ ├── TransportException.java │ │ │ ├── TypeDefaultJsonRpcHandler.java │ │ │ ├── client │ │ │ ├── AbstractJsonRpcClientWebSocket.java │ │ │ ├── AbstractJsonRpcWebSocketClientHandler.java │ │ │ ├── Continuation.java │ │ │ ├── Handler.java │ │ │ ├── JsonRcpServiceAdapter.java │ │ │ ├── JsonRpcClient.java │ │ │ ├── JsonRpcClientHttp.java │ │ │ ├── JsonRpcClientLocal.java │ │ │ ├── JsonRpcClientNettyWebSocket.java │ │ │ ├── JsonRpcWSConnectionAdapter.java │ │ │ ├── JsonRpcWSConnectionListener.java │ │ │ ├── ReconnectedHandler.java │ │ │ ├── RequestAlreadyRespondedException.java │ │ │ └── WebSocketClient.java │ │ │ ├── internal │ │ │ ├── HttpResponseSender.java │ │ │ ├── JsonRpcConstants.java │ │ │ ├── JsonRpcHandlerManager.java │ │ │ ├── JsonRpcRequestSender.java │ │ │ ├── JsonRpcRequestSenderHelper.java │ │ │ ├── ProtocolUtils.java │ │ │ ├── client │ │ │ │ ├── AbstractSession.java │ │ │ │ ├── AbstractTransaction.java │ │ │ │ ├── ClientSession.java │ │ │ │ └── TransactionImpl.java │ │ │ └── ws │ │ │ │ └── PendingRequests.java │ │ │ └── message │ │ │ ├── Message.java │ │ │ ├── MessageUtils.java │ │ │ ├── Request.java │ │ │ ├── Response.java │ │ │ └── ResponseError.java │ │ └── test │ │ └── java │ │ └── org │ │ └── kurento │ │ └── jsonrpc │ │ └── test │ │ ├── GenericMessageTest.java │ │ ├── JsonRpcClientLocalTest.java │ │ ├── JsonRpcHandlerTypesTest.java │ │ └── SessionIdMessageTest.java ├── kurento-jsonrpc-demo-server │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── package │ │ ├── bin │ │ │ ├── install.sh │ │ │ └── start.sh │ │ ├── config │ │ │ ├── kjrserver-log4j.properties │ │ │ └── kjrserver.conf.json │ │ └── support-files │ │ │ ├── kjrserver.service │ │ │ └── kjrserver.sh │ ├── pom.xml │ └── src │ │ ├── assembly │ │ └── bin.xml │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── kurento │ │ │ └── jsonrpc │ │ │ ├── TestServerApplication.java │ │ │ └── handler │ │ │ └── EchoJsonRpcHandler.java │ │ └── resources │ │ ├── banner.txt │ │ ├── kjrserver.conf.json │ │ └── log4j.properties ├── kurento-jsonrpc-server │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── kurento │ │ │ └── jsonrpc │ │ │ ├── internal │ │ │ ├── http │ │ │ │ └── JsonRpcHttpRequestHandler.java │ │ │ ├── server │ │ │ │ ├── BeanCreatingHelper.java │ │ │ │ ├── NativeSessionHandler.java │ │ │ │ ├── PerSessionJsonRpcHandler.java │ │ │ │ ├── PingWatchdogManager.java │ │ │ │ ├── ProtocolManager.java │ │ │ │ ├── ServerSession.java │ │ │ │ ├── SessionsManager.java │ │ │ │ └── config │ │ │ │ │ ├── DefaultJsonRpcHandlerRegistration.java │ │ │ │ │ ├── DefaultJsonRpcHandlerRegistry.java │ │ │ │ │ ├── JsonRpcConfiguration.java │ │ │ │ │ └── JsonRpcProperties.java │ │ │ └── ws │ │ │ │ ├── CloseStatusHelper.java │ │ │ │ ├── JsonRpcWebSocketHandler.java │ │ │ │ └── WebSocketServerSession.java │ │ │ └── server │ │ │ ├── JsonRpcConfigurer.java │ │ │ ├── JsonRpcHandlerRegistration.java │ │ │ └── JsonRpcHandlerRegistry.java │ │ └── test │ │ └── java │ │ └── org │ │ └── kurento │ │ └── jsonrpc │ │ └── test │ │ └── PingWatchdogManagerTest.java └── pom.xml ├── kurento-parent-pom ├── LICENSE ├── NOTICE ├── README.md └── pom.xml ├── kurento-repository ├── LICENSE ├── NOTICE ├── README.md ├── kurento-repository-client │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── kurento │ │ └── repository │ │ ├── RepositoryClient.java │ │ ├── RepositoryClientProvider.java │ │ ├── RepositoryUrlLoader.java │ │ ├── RepositoryUrlProvider.java │ │ └── service │ │ └── pojo │ │ ├── RepositoryItemEndpoint.java │ │ ├── RepositoryItemPlayer.java │ │ └── RepositoryItemRecorder.java ├── kurento-repository-internal │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── kurento │ │ └── repository │ │ ├── DuplicateItemException.java │ │ ├── HttpSessionErrorEvent.java │ │ ├── HttpSessionStartedEvent.java │ │ ├── HttpSessionTerminatedEvent.java │ │ ├── Repository.java │ │ ├── RepositoryApiConfiguration.java │ │ ├── RepositoryHttpEndpoint.java │ │ ├── RepositoryHttpEndpointFactory.java │ │ ├── RepositoryHttpEventListener.java │ │ ├── RepositoryHttpPlayer.java │ │ ├── RepositoryHttpRecorder.java │ │ ├── RepositoryHttpSessionEvent.java │ │ ├── RepositoryItem.java │ │ ├── RepositoryItemAttributes.java │ │ └── internal │ │ ├── ListenerManager.java │ │ ├── RepositoryApplicationContextConfiguration.java │ │ ├── RepositoryHttpEndpointImpl.java │ │ ├── RepositoryHttpPlayerImpl.java │ │ ├── RepositoryHttpRecorderImpl.java │ │ ├── http │ │ ├── RepositoryHttpManager.java │ │ └── RepositoryHttpServlet.java │ │ └── repoimpl │ │ ├── AbstractRepositoryItem.java │ │ ├── RepositoryWithHttp.java │ │ ├── filesystem │ │ ├── FileRepositoryItem.java │ │ ├── FileSystemRepository.java │ │ └── ItemsMetadata.java │ │ └── mongo │ │ ├── MongoConfiguration.java │ │ ├── MongoRepository.java │ │ └── MongoRepositoryItem.java ├── kurento-repository-server │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── package │ │ ├── README │ │ ├── bin │ │ │ ├── install.sh │ │ │ └── start.sh │ │ ├── config │ │ │ ├── kurento-repo-log4j.properties │ │ │ └── kurento-repo.conf.json │ │ └── support-files │ │ │ ├── kurento-repo.service │ │ │ └── kurento-repo.sh │ ├── pom.xml │ ├── repository │ │ └── metadata │ │ │ └── metadata.json │ ├── src │ │ ├── assembly │ │ │ └── bin.xml │ │ └── main │ │ │ ├── java │ │ │ └── org │ │ │ │ └── kurento │ │ │ │ └── repository │ │ │ │ ├── ItemNotFoundException.java │ │ │ │ ├── KurentoRepositoryServerApp.java │ │ │ │ ├── RepositoryController.java │ │ │ │ └── RepositoryService.java │ │ │ └── resources │ │ │ ├── banner.txt │ │ │ ├── kurento-repo.conf.json │ │ │ └── log4j.properties │ └── test-files │ │ ├── logo.png │ │ └── sample.txt └── pom.xml ├── maven-settings ├── README.md └── settings.xml └── pom.xml /.gitignore: -------------------------------------------------------------------------------- 1 | .classpath 2 | .externalToolBuilders 3 | .factorypath 4 | .project 5 | .settings 6 | .springBeans 7 | .vscode/ 8 | *.pyc 9 | *~ 10 | *backup 11 | *Backup 12 | *orig 13 | *tmp/ 14 | log.xml 15 | target 16 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-assembly/NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-assembly/src/build/assembly.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | dist 7 | 8 | zip 9 | 10 | 12 | 13 | 14 | 15 | 16 | *:kurento* 17 | 18 | true 19 | false 20 | runtime 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /kurento-basicroom/NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-basicroom/package/bin/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Kurento Control Server installator for Ubuntu 14.04 4 | if [ `id -u` -ne 0 ]; then 5 | echo "" 6 | echo "Only root can start Kurento" 7 | echo "" 8 | exit 1 9 | fi 10 | 11 | KTS_HOME=$(dirname $(dirname $(readlink -f $0))) 12 | 13 | # Create defaults 14 | mkdir -p /etc/default 15 | cat > /etc/default/kurento-tree-server <<-EOF 16 | # Defaults for kurento-tree-server initscript 17 | # sourced by /etc/init.d/kurento-tree-server 18 | # installed at /etc/default/kurento-tree-server by the maintainer scripts 19 | 20 | # 21 | # This is a POSIX shell fragment 22 | # 23 | 24 | # Commment next line to disable kurento-tree-server daemon 25 | START_DAEMON=true 26 | 27 | # Whom the daemons should run as 28 | DAEMON_USER=nobody 29 | EOF 30 | 31 | # Install binaries 32 | install -o root -g root -m 755 $KTS_HOME/bin/start.sh /usr/bin/kurento-tree-server 33 | install -o root -g root -m 755 $KTS_HOME/support-files/kurento-tree-server.sh /etc/init.d/kurento-tree-server 34 | mkdir -p /var/lib/kurento 35 | install -o root -g root $KTS_HOME/lib/kurento-tree-server.jar /var/lib/kurento/ 36 | mkdir -p /etc/kurento/ 37 | install -o root -g root $KTS_HOME/config/tree-server.conf.json /etc/kurento/tree-server.conf.json 38 | 39 | # enable media connector 40 | update-rc.d kurento-tree-server defaults 41 | 42 | # start media connector 43 | /etc/init.d/kurento-tree-server restart 44 | -------------------------------------------------------------------------------- /kurento-basicroom/package/config/room-server.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "ws": { 3 | "port": "8890", 4 | "path": "kurento-tree" 5 | }, 6 | "kms": { 7 | "uris": [ 8 | "ws://127.0.0.1:8888/kurento" 9 | ] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /kurento-basicroom/src/assembly/bin.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | bin 6 | 7 | zip 8 | 9 | false 10 | 11 | 12 | 13 | target/${project.artifactId}-${project.version}.jar 14 | lib 15 | ${project.artifactId}.jar 16 | 17 | 18 | 19 | 20 | 21 | package 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /kurento-basicroom/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | 2 | .------------------------------------. 3 | | | 4 | | | |/ / _ _ _ ___ _ _| |_ ___ | 5 | | | ' < || | '_/ -_) ' \ _/ _ \ | 6 | | |_|\_\_,_|_| \___|_||_\__\___/ | 7 | | | 8 | '------------------------------------' 9 | version ${project.version} 10 | -------------------------------------------------------------------------------- /kurento-basicroom/src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Room Example 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |
19 |
20 |

Join a Room

21 |
22 |

23 | 25 |

26 |

27 | 29 |

30 |

31 | 32 |

33 |
34 |
35 | 42 |
43 |
44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /kurento-basicroom/src/test/resources/basic-kurento-room.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "ws": { 3 | "port": "8891", 4 | "path": "kurento-room" 5 | }, 6 | "kms": { 7 | "uri": "ws://192.168.0.1:8888/kurento" 8 | } 9 | } -------------------------------------------------------------------------------- /kurento-client/NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/Continuation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | 19 | package org.kurento.client; 20 | 21 | /** 22 | * This interface is to be used in asynchronous calls to the media server. 23 | * 24 | * @param 25 | * The data type of the callback´s response in case of successful outcome. 26 | * 27 | * @author Luis López (llopez@gsyc.es) 28 | * @author Ivan Gracia (igracia@gsyc.es) 29 | * @since 2.0.0 30 | */ 31 | public interface Continuation { 32 | 33 | /** 34 | * This method is called when the operation succeeds. 35 | * 36 | * @param result 37 | * The result of the completed operation 38 | */ 39 | void onSuccess(F result) throws Exception; 40 | 41 | /** 42 | * This method gets called when the operation fails. 43 | * 44 | * @param cause 45 | * The cause of the failure 46 | */ 47 | void onError(Throwable cause) throws Exception; 48 | 49 | } 50 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/Event.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | 19 | package org.kurento.client; 20 | 21 | /** 22 | * Parent interface for Kurento events. 23 | * 24 | **/ 25 | public interface Event { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/EventListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | 19 | package org.kurento.client; 20 | 21 | /** 22 | * Interface to be implemented by {@link MediaEvent} listeners. Implementors of this interface will 23 | * be on charge of processing the events raised by media elements. 24 | * 25 | * @param 26 | * A class that extends from {@link Event} 27 | * 28 | * @author Luis López (llopez@gsyc.es), Ivan Gracia (igracia@gsyc.es) 29 | * 30 | **/ 31 | public interface EventListener { 32 | /** 33 | * Called from the framework when an event is raised at the media server. 34 | * 35 | * @param event 36 | * a T event 37 | * 38 | */ 39 | void onEvent(T event); 40 | } 41 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/GenericMediaElement.java: -------------------------------------------------------------------------------- 1 | package org.kurento.client; 2 | 3 | public interface GenericMediaElement extends MediaElement { 4 | 5 | public class Builder extends AbstractBuilder { 6 | 7 | public Builder(org.kurento.client.MediaPipeline mediaPipeline, String mediaElementClassName) { 8 | super(GenericMediaElement.class, mediaPipeline); 9 | props.add("mediaPipeline", mediaPipeline); 10 | props.add("mediaElementClassName", mediaElementClassName); 11 | } 12 | 13 | public Builder withConstructorParam(String name, Object value) { 14 | props.add(name, value); 15 | return this; 16 | } 17 | 18 | public Builder withProperties(Properties properties) { 19 | return (Builder) super.withProperties(properties); 20 | } 21 | 22 | public Builder with(String name, Object value) { 23 | return (Builder) super.with(name, value); 24 | } 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/GenericMediaEvent.java: -------------------------------------------------------------------------------- 1 | package org.kurento.client; 2 | 3 | import org.kurento.jsonrpc.Props; 4 | 5 | public class GenericMediaEvent extends MediaEvent { 6 | 7 | Props data; 8 | 9 | public GenericMediaEvent(@org.kurento.client.internal.server.Param("source") org.kurento.client.MediaObject source, 10 | @org.kurento.client.internal.server.Param("timestamp") String timestamp, 11 | @org.kurento.client.internal.server.Param("timestampMillis") String timestampMillis, 12 | @org.kurento.client.internal.server.Param("tags") java.util.List tags, 13 | @org.kurento.client.internal.server.Param("type") String type, 14 | @org.kurento.client.internal.server.Param("genericData") Props data) { 15 | super(source, timestamp, timestampMillis, tags, type); 16 | this.data = data; 17 | } 18 | 19 | public Props getData() { 20 | return this.data; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/Handler.java: -------------------------------------------------------------------------------- 1 | package org.kurento.client; 2 | 3 | public interface Handler { 4 | public void run(); 5 | } -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/KurentoConnectionListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client; 19 | 20 | public interface KurentoConnectionListener { 21 | 22 | /** 23 | * Method invoked when the Kurento client successfully connects to the server. 24 | */ 25 | void connected(); 26 | 27 | /** 28 | * Method invoked when the Kurento client could not connect to the server. This method can be 29 | * invoked also if a reconnection is needed. 30 | */ 31 | void connectionFailed(); 32 | 33 | /** 34 | * Method invoked when the Kurento client connection with the server is interrupted. 35 | */ 36 | void disconnected(); 37 | 38 | /** 39 | * Method invoked when the Kurento client is reconnected to a server. 40 | */ 41 | void reconnected(boolean sameServer); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/ListenerSubscription.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | 19 | package org.kurento.client; 20 | 21 | /** 22 | * Interface to be implemented by objects that represent the subscription to an event in Kurento. 23 | * Implementers of this interface may be used by the system to track listeners of events registered 24 | * by users. Subscribing to a certain {@link MediaEvent} raised by a {@link MediaObject} generates a 25 | * {@code ListenerSubscription}, that can be used by the client to unregister this listener. 26 | * 27 | * @author Luis López (llopez@gsyc.es) 28 | * @author Ivan Gracia (igracia@gsyc.es) 29 | * @since 2.0.0 30 | */ 31 | public interface ListenerSubscription { 32 | 33 | /** 34 | * Returns the registration id for this listener. 35 | * 36 | * @return The id 37 | */ 38 | String getSubscriptionId(); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/ReconnectedHandler.java: -------------------------------------------------------------------------------- 1 | package org.kurento.client; 2 | 3 | public interface ReconnectedHandler { 4 | public void run(boolean sameServer); 5 | } -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/Transaction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client; 19 | 20 | public interface Transaction { 21 | 22 | public void commit(); 23 | 24 | public void commit(Continuation continuation); 25 | 26 | public void rollback(); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/TransactionExecutionException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client; 19 | 20 | import org.kurento.client.internal.client.operation.Operation; 21 | import org.kurento.client.internal.server.KurentoServerException; 22 | import org.kurento.jsonrpc.message.ResponseError; 23 | 24 | public class TransactionExecutionException extends KurentoServerException { 25 | 26 | private static final long serialVersionUID = 6694105597823767195L; 27 | 28 | public TransactionExecutionException(Operation operation, ResponseError error) { 29 | super(createExceptionMessage(operation, error), error); 30 | } 31 | 32 | private static String createExceptionMessage(Operation operation, ResponseError error) { 33 | return "Error '" + error.getCompleteMessage() + "' executing operation '" 34 | + operation.getDescription() + "'"; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/TransactionNotCommitedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client; 19 | 20 | public class TransactionNotCommitedException extends TransactionException { 21 | 22 | private static final long serialVersionUID = 3270649817818849622L; 23 | 24 | public TransactionNotCommitedException() { 25 | } 26 | 27 | public TransactionNotCommitedException(String message) { 28 | super(message); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/TransactionNotExecutedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client; 19 | 20 | public class TransactionNotExecutedException extends RuntimeException { 21 | 22 | private static final long serialVersionUID = 3270649817818849622L; 23 | 24 | public TransactionNotExecutedException() { 25 | } 26 | 27 | public TransactionNotExecutedException(String message) { 28 | super(message); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/internal/KmsProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal; 19 | 20 | public interface KmsProvider { 21 | 22 | public String reserveKms(String id, int loadPoints) throws NotEnoughResourcesException; 23 | 24 | public String reserveKms(String id) throws NotEnoughResourcesException; 25 | 26 | public void releaseKms(String id) throws NotEnoughResourcesException; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/internal/ModuleName.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal; 19 | 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface ModuleName { 25 | String value(); 26 | } 27 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/internal/NotEnoughResourcesException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal; 19 | 20 | @SuppressWarnings("serial") 21 | public class NotEnoughResourcesException extends RuntimeException { 22 | 23 | public NotEnoughResourcesException(String message) { 24 | super(message); 25 | } 26 | 27 | public NotEnoughResourcesException(String message, Throwable cause) { 28 | super(message, cause); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/internal/RemoteClass.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal; 19 | 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface RemoteClass { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/internal/client/DefaultContinuation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal.client; 19 | 20 | import org.kurento.client.Continuation; 21 | import org.slf4j.Logger; 22 | import org.slf4j.LoggerFactory; 23 | 24 | public abstract class DefaultContinuation implements Continuation { 25 | 26 | protected static final Logger log = LoggerFactory.getLogger(DefaultContinuation.class); 27 | private final Continuation cont; 28 | 29 | public DefaultContinuation(Continuation cont) { 30 | this.cont = cont; 31 | } 32 | 33 | @Override 34 | public abstract void onSuccess(F result) throws Exception; 35 | 36 | @Override 37 | public void onError(Throwable cause) { 38 | try { 39 | cont.onError(cause); 40 | } catch (Exception e) { 41 | log.warn("[Continuation] error invoking onError implemented by client", e); 42 | } 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/internal/client/ErrorLogContinuation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal.client; 19 | 20 | import org.kurento.client.Continuation; 21 | import org.slf4j.Logger; 22 | import org.slf4j.LoggerFactory; 23 | 24 | public class ErrorLogContinuation implements Continuation { 25 | 26 | private static Logger LOG = LoggerFactory.getLogger(ErrorLogContinuation.class); 27 | private String message; 28 | 29 | public ErrorLogContinuation(String message) { 30 | this.message = message; 31 | } 32 | 33 | @Override 34 | public void onSuccess(E result) { 35 | } 36 | 37 | @Override 38 | public void onError(Throwable cause) { 39 | LOG.error(message, cause); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/internal/client/RemoteObjectEventListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal.client; 19 | 20 | import org.kurento.jsonrpc.Props; 21 | 22 | public interface RemoteObjectEventListener { 23 | public void onEvent(String eventType, Props data); 24 | } -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/internal/client/RomEventHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal.client; 19 | 20 | import org.kurento.jsonrpc.Props; 21 | 22 | public interface RomEventHandler { 23 | 24 | void processEvent(String objectRef, String subscription, String type, Props data); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/internal/server/EventSubscription.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal.server; 19 | 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | 23 | import org.kurento.client.Event; 24 | 25 | @Retention(RetentionPolicy.RUNTIME) 26 | public @interface EventSubscription { 27 | Class value(); 28 | } -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/internal/server/KurentoServerTransportException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal.server; 19 | 20 | import org.kurento.commons.exception.KurentoException; 21 | 22 | /** 23 | * This exception occurs when there is a communication error. This could happen either when trying 24 | * to reach KMS, or when the server is trying to send a response to the client. 25 | * 26 | * @author Ivan Gracia (izanmail@gmail.com) 27 | * @since 4.2.1 28 | * 29 | */ 30 | public class KurentoServerTransportException extends KurentoException { 31 | 32 | private static final long serialVersionUID = -9166377169939591329L; 33 | 34 | public KurentoServerTransportException(String message, Throwable cause) { 35 | super(message, cause); 36 | } 37 | 38 | public KurentoServerTransportException(String message) { 39 | super(message); 40 | } 41 | 42 | public KurentoServerTransportException(Throwable cause) { 43 | super(cause); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/internal/server/Param.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal.server; 19 | 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Param { 25 | 26 | String value(); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/internal/server/ProtocolException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal.server; 19 | 20 | import org.kurento.commons.exception.KurentoException; 21 | 22 | /** 23 | * Exception that represents an error in the JSON RPC protocol (i.e. malformed commands and so on) 24 | * 25 | * @author Ivan Gracia (izanmail@gmail.com) 26 | * @since 4.2.1 27 | * 28 | */ 29 | public class ProtocolException extends KurentoException { 30 | 31 | private static final long serialVersionUID = -4925041543188451274L; 32 | 33 | public ProtocolException(String message, Throwable cause) { 34 | super(message, cause); 35 | } 36 | 37 | public ProtocolException(String message) { 38 | super(message); 39 | } 40 | 41 | public ProtocolException(Throwable cause) { 42 | super(cause); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /kurento-client/src/main/java/org/kurento/client/internal/transport/serialization/ObjectRefsManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal.transport.serialization; 19 | 20 | public interface ObjectRefsManager { 21 | 22 | public Object getObject(String objectRef); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /kurento-client/src/main/kmd/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kurento/kurento-java/9718d0a897541f0183bf515af87afa9593494ff4/kurento-client/src/main/kmd/.keep -------------------------------------------------------------------------------- /kurento-client/src/main/resources/templates/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageName": "com.kurento.kmf.media", 3 | "subfolder": "com/kurento/kmf/media", 4 | "expandMethodsWithOpsParams": true, 5 | "importedPackages": [] 6 | } -------------------------------------------------------------------------------- /kurento-client/src/main/resources/templates/macros.ftm: -------------------------------------------------------------------------------- 1 | <#macro comment doc params=[] return={}> 2 | /** 3 | * 4 | <#t><#if doc??> 5 | <#t><#list doc?split("\n") as x><#assign line = sphinxLinks(x) ><#rt> 6 | <#lt><#if (line != "") > * ${line} 7 | <#lt><#rt> 8 | <#lt><#rt> 9 | <#t><#rt> 10 | <#lt><#if (params?? && params?size > 0) > 11 | * 12 | <#lt><#rt> 13 | <#t><#list params as param> 14 | <#lt> * @param ${param.name} 15 | <#if param.doc??><#list param.doc?split("\n") as x><#rt> 16 | * ${sphinxLinks(x)} 17 | <#rt> 18 | <#if return.doc??> * @return ${sphinxLinks(return.doc)}<#rt> 19 | * 20 | **/ 21 | 22 | 23 | <#macro comment_set_get doc type> 24 | /** 25 | * 26 | <#lt><#assign first = true><#rt> 27 | <#t><#if doc??> 28 | <#t><#list doc?split("\n") as x><#assign line = sphinxLinks(x) ><#rt> 29 | <#lt><#if (line != "") > 30 | <#lt><#if (first) > 31 | <#lt><#if (line != "@deprecated") > 32 | <#lt> * ${type} ${line} 33 | <#lt><#assign first = false><#rt> 34 | <#else> 35 | <#lt> * ${line} 36 | <#lt><#rt> 37 | <#lt><#else> * ${line} 38 | <#lt><#rt> 39 | <#lt><#rt> 40 | <#lt><#rt> 41 | <#t><#rt> 42 | * 43 | **/ 44 | 45 | -------------------------------------------------------------------------------- /kurento-client/src/main/resources/templates/model_moduleInfo_class_java.ftl: -------------------------------------------------------------------------------- 1 | <#if module.name != "elements" && module.name != "filters"><#rt> 2 | <#if module.name == "core"><#rt> 3 | ${packageToFolder("org.kurento.module")}/KurentoModuleInfo.java 4 | <#else> 5 | ${packageToFolder("org.kurento.module")}/${module.name?cap_first}ModuleInfo.java 6 | 7 | /** 8 | * This file is generated with Kurento-maven-plugin. 9 | * Please don't edit. 10 | */ 11 | package org.kurento.module; 12 | 13 | <#if module.name == "core"><#rt> 14 | public class KurentoModuleInfo { 15 | <#else> 16 | public class ${module.name?cap_first}ModuleInfo { 17 | 18 | public static String getPackageName () { 19 | 20 | return "${module.code.api.java.packageName}"; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /kurento-client/src/test/java/org/kurento/client/internal/test/LocalRomTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal.test; 19 | 20 | import org.kurento.client.internal.transport.jsonrpc.RomServerJsonRpcHandler; 21 | import org.kurento.jsonrpc.JsonRpcHandler; 22 | import org.kurento.jsonrpc.client.JsonRpcClient; 23 | import org.kurento.jsonrpc.client.JsonRpcClientLocal; 24 | 25 | public class LocalRomTest extends AbstractRomTest { 26 | 27 | private JsonRpcHandler handler; 28 | 29 | @Override 30 | protected JsonRpcClient createJsonRpcClient() { 31 | return new JsonRpcClientLocal(handler); 32 | } 33 | 34 | @Override 35 | protected void startJsonRpcServer(RomServerJsonRpcHandler jsonRpcHandler) { 36 | this.handler = jsonRpcHandler; 37 | } 38 | 39 | @Override 40 | protected void destroyJsonRpcServer() { 41 | 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /kurento-client/src/test/java/org/kurento/client/internal/test/model/Sample2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal.test.model; 19 | 20 | import org.kurento.client.AbstractBuilder; 21 | import org.kurento.client.KurentoObject; 22 | import org.kurento.client.internal.client.RomManager; 23 | 24 | public interface Sample2 extends KurentoObject { 25 | 26 | public String getAtt1(); 27 | 28 | public int getAtt2(); 29 | 30 | public float getAtt3(); 31 | 32 | public boolean getAtt4(); 33 | 34 | public static class Builder extends AbstractBuilder { 35 | 36 | public Builder(String att1, int att2, RomManager manager) { 37 | super(Sample2.class, manager); 38 | props.add("att1", att1); 39 | props.add("att2", att2); 40 | } 41 | 42 | public Builder withAtt3(float att3) { 43 | props.add("att3", att3); 44 | return this; 45 | } 46 | 47 | public Builder att4() { 48 | props.add("att4", Boolean.TRUE); 49 | return this; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /kurento-client/src/test/java/org/kurento/client/internal/test/model/Sample2Impl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal.test.model; 19 | 20 | import org.kurento.client.internal.RemoteClass; 21 | import org.kurento.client.internal.server.Param; 22 | 23 | @RemoteClass 24 | public class Sample2Impl { 25 | 26 | private String att1; 27 | private int att2; 28 | private float att3; 29 | private boolean att4; 30 | 31 | public Sample2Impl(@Param("att1") String att1, @Param("att2") int att2, @Param("att3") float att3, 32 | @Param("att4") boolean att4) { 33 | this.att1 = att1; 34 | this.att2 = att2; 35 | this.att3 = att3; 36 | this.att4 = att4; 37 | } 38 | 39 | public String getAtt1() { 40 | return att1; 41 | } 42 | 43 | public int getAtt2() { 44 | return att2; 45 | } 46 | 47 | public float getAtt3() { 48 | return att3; 49 | } 50 | 51 | public boolean getAtt4() { 52 | return att4; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /kurento-client/src/test/java/org/kurento/client/internal/test/model/client/MediaServerFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal.test.model.client; 19 | 20 | import org.kurento.client.internal.server.Param; 21 | 22 | public abstract class MediaServerFactory { 23 | 24 | public abstract SampleClass.Builder createSampleClass(@Param("att1") String att1, 25 | @Param("att2") boolean att2); 26 | } 27 | -------------------------------------------------------------------------------- /kurento-client/src/test/java/org/kurento/client/internal/test/model/client/SampleEnum.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal.test.model.client; 19 | 20 | public enum SampleEnum { 21 | CONSTANT_1, CONSTANT_2 22 | } 23 | -------------------------------------------------------------------------------- /kurento-client/src/test/java/org/kurento/client/internal/test/model/client/events/BaseEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal.test.model.client.events; 19 | 20 | import org.kurento.client.Event; 21 | import org.kurento.client.internal.server.Param; 22 | 23 | public class BaseEvent implements Event { 24 | 25 | private String prop2; 26 | 27 | public BaseEvent(@Param("prop2") String prop2) { 28 | super(); 29 | this.prop2 = prop2; 30 | } 31 | 32 | public String getProp2() { 33 | return prop2; 34 | } 35 | 36 | public void setProp2(String prop2) { 37 | this.prop2 = prop2; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /kurento-client/src/test/java/org/kurento/client/internal/test/model/client/events/SampleEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.internal.test.model.client.events; 19 | 20 | import org.kurento.client.internal.server.Param; 21 | 22 | public class SampleEvent extends BaseEvent { 23 | 24 | private String prop1; 25 | 26 | public SampleEvent(@Param("prop2") String prop2, @Param("prop1") String prop1) { 27 | super(prop2); 28 | this.prop1 = prop1; 29 | } 30 | 31 | public String getProp1() { 32 | return prop1; 33 | } 34 | 35 | public void setProp1(String prop1) { 36 | this.prop1 = prop1; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /kurento-client/src/test/java/org/kurento/module/ComplexParamModuleInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.module; 19 | 20 | public class ComplexParamModuleInfo { 21 | public static String getPackageName() { 22 | 23 | return "org.kurento.client.internal.test.model.client"; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /kurento-client/src/test/resources/config-test.properties: -------------------------------------------------------------------------------- 1 | kms.url: ws://test.url 2 | -------------------------------------------------------------------------------- /kurento-client/src/test/resources/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageName": "com.kurento.tool.rom.test.model.client", 3 | "subfolder": "" 4 | } -------------------------------------------------------------------------------- /kurento-client/src/test/resources/invalid-config.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kurento/kurento-java/9718d0a897541f0183bf515af87afa9593494ff4/kurento-client/src/test/resources/invalid-config.properties -------------------------------------------------------------------------------- /kurento-client/src/test/resources/provider-config.properties: -------------------------------------------------------------------------------- 1 | kms.url.provider: org.kurento.client.internal.test.KmsUrlServiceLoaderTest$TestKmsUrlProvider 2 | -------------------------------------------------------------------------------- /kurento-commons/NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-commons/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | 7 | org.kurento 8 | kurento-parent-pom 9 | 6.18.1-SNAPSHOT 10 | ../kurento-parent-pom 11 | 12 | kurento-commons 13 | jar 14 | 15 | 16 | Kurento Common utils 17 | 18 | Common utils and classes for Kurento Java. 19 | This project contains common util classes for the Kurento Java. 20 | 21 | 22 | 23 | 24 | 25 | 26 | org.slf4j 27 | slf4j-api 28 | 29 | 30 | org.slf4j 31 | slf4j-simple 32 | test 33 | 34 | 35 | junit 36 | junit 37 | test 38 | 39 | 40 | com.google.code.gson 41 | gson 42 | 43 | 44 | com.google.guava 45 | guava 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /kurento-commons/src/main/java/org/kurento/commons/Address.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.commons; 19 | 20 | public class Address { 21 | 22 | private String host; 23 | private int port; 24 | 25 | public Address(String host, int port) { 26 | super(); 27 | this.host = host; 28 | this.port = port; 29 | } 30 | 31 | public String getHost() { 32 | return host; 33 | } 34 | 35 | public void setHost(String host) { 36 | this.host = host; 37 | } 38 | 39 | public int getPort() { 40 | return port; 41 | } 42 | 43 | public void setPort(int port) { 44 | this.port = port; 45 | } 46 | 47 | @Override 48 | public String toString() { 49 | return host + ":" + port; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /kurento-commons/src/main/java/org/kurento/commons/SecretGenerator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.commons; 19 | 20 | import java.math.BigInteger; 21 | import java.security.SecureRandom; 22 | 23 | /** 24 | * Random word (integer) generator. 25 | * 26 | * @author Luis López (llopez@gsyc.es) 27 | * @version 1.0.0 28 | */ 29 | public class SecretGenerator { 30 | 31 | /** 32 | * Secure random generator object. 33 | */ 34 | private static SecureRandom secureRandom = new SecureRandom(); 35 | 36 | /** 37 | * Random word generator. 38 | * 39 | * @return Generated word 40 | */ 41 | public String nextSecret() { 42 | // SecureRandom is thread safe, so no synchronization issues here 10 43 | return new BigInteger(130, secureRandom).toString(32); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /kurento-commons/src/main/java/org/kurento/commons/ThreadFactoryCreator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package org.kurento.commons; 18 | 19 | import java.util.concurrent.ThreadFactory; 20 | import java.util.concurrent.atomic.AtomicLong; 21 | 22 | import com.google.common.util.concurrent.ThreadFactoryBuilder; 23 | 24 | public class ThreadFactoryCreator { 25 | 26 | private static final AtomicLong numExecutor = new AtomicLong(0); 27 | 28 | public static ThreadFactory create(String name) { 29 | return new ThreadFactoryBuilder() 30 | .setNameFormat(name + "-e" + numExecutor.incrementAndGet() + "-t%d").build(); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /kurento-commons/src/main/java/org/kurento/commons/TimeoutRuntimeException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.commons; 19 | 20 | public class TimeoutRuntimeException extends RuntimeException { 21 | 22 | private static final long serialVersionUID = -2273855137081386476L; 23 | 24 | public TimeoutRuntimeException() { 25 | } 26 | 27 | public TimeoutRuntimeException(String message) { 28 | super(message); 29 | } 30 | 31 | public TimeoutRuntimeException(Throwable cause) { 32 | super(cause); 33 | } 34 | 35 | public TimeoutRuntimeException(String message, Throwable cause) { 36 | super(message, cause); 37 | } 38 | 39 | public TimeoutRuntimeException(String message, Throwable cause, boolean enableSuppression, 40 | boolean writableStackTrace) { 41 | super(message, cause, enableSuppression, writableStackTrace); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /kurento-commons/src/main/java/org/kurento/commons/testing/IntegrationTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.commons.testing; 19 | 20 | /** 21 | * Base category for integration tests 22 | * 23 | * @author Ivan Gracia (izanmail@gmail.com) 24 | * @since 4.3.0 25 | * 26 | */ 27 | public interface IntegrationTests { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /kurento-commons/src/main/java/org/kurento/commons/testing/JsonRpcConnectorTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.commons.testing; 19 | 20 | /** 21 | * Category for integration tests belonging to kurento-jsonrpcconnector-test 22 | * 23 | * @author Ivan Gracia (izanmail@gmail.com) 24 | * @since 4.3.0 25 | * 26 | */ 27 | public interface JsonRpcConnectorTests extends IntegrationTests { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /kurento-commons/src/main/java/org/kurento/commons/testing/KurentoClientTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.commons.testing; 19 | 20 | /** 21 | * Category for integration tests belonging to kurento-client-test 22 | * 23 | * @author Ivan Gracia (izanmail@gmail.com) 24 | * @since 4.3.0 25 | * 26 | */ 27 | public interface KurentoClientTests extends IntegrationTests { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /kurento-commons/src/main/java/org/kurento/commons/testing/KurentoControlServerTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.commons.testing; 19 | 20 | /** 21 | * Category for integration tests belonging to kurento-client-test 22 | * 23 | * @author Ivan Gracia (izanmail@gmail.com) 24 | * @since 4.3.0 25 | * 26 | */ 27 | public interface KurentoControlServerTests extends IntegrationTests { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /kurento-commons/src/main/java/org/kurento/commons/testing/KurentoTreeTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.commons.testing; 19 | 20 | /** 21 | * Category for integration tests belonging to kurento-tree 22 | * 23 | * @author Ivan Gracia (izanmail@gmail.com) 24 | * @since 4.3.0 25 | * 26 | */ 27 | public interface KurentoTreeTests extends IntegrationTests { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /kurento-commons/src/main/java/org/kurento/commons/testing/RepositoryApiTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.commons.testing; 19 | 20 | /** 21 | * Category for integration tests belonging to kurento-repository-api-test 22 | * 23 | * @author Ivan Gracia (izanmail@gmail.com) 24 | * @since 4.3.0 25 | * 26 | */ 27 | public interface RepositoryApiTests extends IntegrationTests { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /kurento-commons/src/main/java/org/kurento/commons/testing/SanityTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.commons.testing; 19 | 20 | /** 21 | * Category for integration tests belonging to sanity-test. 22 | * 23 | * @author Boni Garcia (bgarcia@gsyc.es) 24 | * @since 5.0.4 25 | * 26 | */ 27 | public interface SanityTests extends IntegrationTests { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /kurento-commons/src/main/java/org/kurento/commons/testing/SystemCompatibilityTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2015 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.commons.testing; 19 | 20 | /** 21 | * Category for system tests that test compatibility capabilities. 22 | * 23 | * @author Boni Garcia (bgarcia@gsyc.es) 24 | * @since 5.0.5 25 | * 26 | */ 27 | public interface SystemCompatibilityTests extends SystemTests { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /kurento-commons/src/main/java/org/kurento/commons/testing/SystemFunctionalTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.commons.testing; 19 | 20 | /** 21 | * Category for system tests that test functional capabilities. 22 | * 23 | * @author Ivan Gracia (izanmail@gmail.com) 24 | * @since 4.3.0 25 | * 26 | */ 27 | public interface SystemFunctionalTests extends SystemTests { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /kurento-commons/src/main/java/org/kurento/commons/testing/SystemPerformanceTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.commons.testing; 19 | 20 | /** 21 | * Category for system tests that test performance capabilities. 22 | * 23 | * @author Boni Garcia (bgarcia@gsyc.es) 24 | * @since 5.0.5 25 | * 26 | */ 27 | public interface SystemPerformanceTests extends SystemTests { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /kurento-commons/src/main/java/org/kurento/commons/testing/SystemQualityTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.commons.testing; 19 | 20 | /** 21 | * Category for system tests that test quality capabilities. 22 | * 23 | * @author Boni Garcia (bgarcia@gsyc.es) 24 | * @since 5.0.5 25 | * 26 | */ 27 | public interface SystemQualityTests extends SystemTests { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /kurento-commons/src/main/java/org/kurento/commons/testing/SystemScalabilityTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2015 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.commons.testing; 19 | 20 | /** 21 | * Category for system tests that test scalability capabilities. 22 | * 23 | * @author Boni Garcia (bgarcia@gsyc.es) 24 | * @since 6.1.1 25 | * 26 | */ 27 | public interface SystemScalabilityTests extends SystemTests { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /kurento-commons/src/main/java/org/kurento/commons/testing/SystemStabilityTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.commons.testing; 19 | 20 | /** 21 | * Category for system tests that test stability. 22 | * 23 | * @author Boni Garcia (bgarcia@gsyc.es) 24 | * @since 5.0.5 25 | * 26 | */ 27 | public interface SystemStabilityTests extends SystemTests { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /kurento-commons/src/main/java/org/kurento/commons/testing/SystemTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.commons.testing; 19 | 20 | /** 21 | * Category for integration tests belonging to kurento-system-test 22 | * 23 | * @author Ivan Gracia (izanmail@gmail.com) 24 | * @since 4.3.0 25 | * 26 | */ 27 | public interface SystemTests extends IntegrationTests { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /kurento-commons/src/test/resources/test.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "prop1" : "value1", 3 | "prop2" : { 4 | "prop1": "xxx" 5 | }, 6 | "mediaServer":{ 7 | "netInterface":{ 8 | "//": "Uncomment just one of them", 9 | "websocket": { 10 | "port": 8888, 11 | "path": "kurento", 12 | "threads": 10 13 | } 14 | /* "rabbitmq":{ 15 | "address":"127.0.0.1", 16 | "port":5672, 17 | "username":"guest", 18 | "password":"guest", 19 | "vhost" : "/" } */ 20 | /* "websocket": { 21 | "port": 9090, 22 | "path": "kurento" 23 | } */ 24 | } 25 | } 26 | }, 27 | "controlServer" : { 28 | "netInterface" : { 29 | "websocket" : { 30 | "port": 8888, 31 | "path": "kurento" 32 | }, 33 | "thriftCallback": { 34 | "port": 9091 35 | } 36 | }, 37 | "logConfigFile": "/opt/kurento/logback.xml", 38 | "oauthserverUrl": "", 39 | "keystore" : { 40 | "file" : "ssss", 41 | "pass" : "ssss" 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /kurento-integration-tests/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | kurento-integration-tests 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.m2e.core.maven2Builder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.m2e.core.maven2Nature 16 | 17 | 18 | 19 | 1604570591325 20 | 21 | 30 22 | 23 | org.eclipse.core.resources.regexFilterMatcher 24 | node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /kurento-integration-tests/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /kurento-integration-tests/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /kurento-integration-tests/NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-benchmark/NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-benchmark/keystore.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kurento/kurento-java/9718d0a897541f0183bf515af87afa9593494ff4/kurento-integration-tests/kurento-benchmark/keystore.jks -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-benchmark/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | 7 | org.kurento 8 | kurento-integration-tests 9 | 6.18.1-SNAPSHOT 10 | 11 | kurento-benchmark 12 | jar 13 | 14 | 15 | Kurento Benchmark 16 | This module contains tests for KMS benchmarking. 17 | 18 | 19 | 20 | 21 | 22 | org.kurento 23 | kurento-client 24 | test 25 | 26 | 27 | junit 28 | junit 29 | test 30 | 31 | 32 | org.slf4j 33 | slf4j-api 34 | 35 | 36 | org.kurento 37 | kurento-test 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-benchmark/src/main/java/App.java: -------------------------------------------------------------------------------- 1 | public class App {} -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-client-test/NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-client-test/src/main/java/App.java: -------------------------------------------------------------------------------- 1 | public class App {} -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-client-test/src/test/java/org/kurento/client/test/ApiBase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2015 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.test; 19 | 20 | import org.kurento.test.base.KurentoClientTest; 21 | 22 | /** 23 | * Base for API tests. 24 | * 25 | * @author Boni Garcia (bgarcia@gsyc.es) 26 | * @since 6.1.1 27 | */ 28 | public class ApiBase extends KurentoClientTest { 29 | 30 | public static final String URL_BARCODES = "http://" + getTestFilesHttpPath() 31 | + "/video/filter/barcodes.webm"; 32 | public static final String URL_FIWARECUT = "http://" + getTestFilesHttpPath() 33 | + "/video/filter/fiwarecut.webm"; 34 | public static final String URL_SMALL = "http://" + getTestFilesHttpPath() 35 | + "/video/format/small.webm"; 36 | public static final String URL_PLATES = "http://" + getTestFilesHttpPath() 37 | + "/video/filter/plates.webm"; 38 | public static final String URL_POINTER_DETECTOR = "http://" + getTestFilesHttpPath() 39 | + "/video/filter/pointerDetector.mp4"; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-client-test/src/test/java/org/kurento/client/test/WebRtcEndpointTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.test; 19 | 20 | import org.junit.Before; 21 | import org.kurento.client.WebRtcEndpoint; 22 | import org.kurento.client.test.util.SdpBaseTest; 23 | 24 | /** 25 | * {@link WebRtcEndpoint} test suite. 26 | * 27 | * 28 | * 29 | * @author Ivan Gracia (igracia@gsyc.es) 30 | * @version 1.0.0 31 | * 32 | */ 33 | public class WebRtcEndpointTest extends SdpBaseTest { 34 | 35 | @Before 36 | public void setupMediaElements() { 37 | sdp = new WebRtcEndpoint.Builder(pipeline).build(); 38 | sdp2 = new WebRtcEndpoint.Builder(pipeline).build(); 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-client-test/src/test/java/org/kurento/client/test/util/AsyncEventManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.test.util; 19 | 20 | import org.kurento.client.EventListener; 21 | import org.kurento.client.MediaEvent; 22 | 23 | public class AsyncEventManager extends AsyncManager { 24 | 25 | public AsyncEventManager(String message) { 26 | super(message); 27 | } 28 | 29 | public EventListener getMediaEventListener() { 30 | 31 | return new EventListener() { 32 | @Override 33 | public void onEvent(T event) { 34 | addResult(event); 35 | } 36 | }; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-client-test/src/test/java/org/kurento/client/test/util/AsyncResultManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.test.util; 19 | 20 | import org.kurento.client.Continuation; 21 | 22 | public class AsyncResultManager extends AsyncManager { 23 | 24 | public AsyncResultManager(String message) { 25 | super(message); 26 | } 27 | 28 | public Continuation getContinuation() { 29 | return new Continuation() { 30 | 31 | @Override 32 | public void onSuccess(E result) throws Exception { 33 | addResult(result); 34 | } 35 | 36 | @Override 37 | public void onError(Throwable cause) throws Exception { 38 | addError(cause); 39 | } 40 | }; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-client-test/src/test/java/org/kurento/client/test/util/MediaPipelineBaseTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.client.test.util; 19 | 20 | import org.junit.After; 21 | import org.junit.Before; 22 | import org.junit.experimental.categories.Category; 23 | import org.kurento.client.MediaPipeline; 24 | import org.kurento.client.test.ApiBase; 25 | import org.kurento.commons.testing.KurentoClientTests; 26 | 27 | @Category(KurentoClientTests.class) 28 | public abstract class MediaPipelineBaseTest extends ApiBase { 29 | 30 | protected MediaPipeline pipeline; 31 | 32 | @Before 33 | public void setupPipeline() { 34 | pipeline = kurentoClient.createMediaPipeline(); 35 | } 36 | 37 | @After 38 | public void teardownPipeline() { 39 | if (pipeline != null) { 40 | pipeline.release(); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-client-test/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Define the root logger with file appender 2 | log4j.rootLogger = INFO, stdout 3 | log4j.logger.org.apache.catalina.startup.DigesterFactory=ERROR 4 | log4j.logger.org.apache=WARN 5 | log4j.logger.org.springframework=WARN 6 | log4j.logger.org.kurento=DEBUG 7 | log4j.logger.org.kurento.test.Shell=WARN 8 | 9 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 10 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 11 | log4j.appender.stdout.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss.SSS}] boot%X{context} - ${PID} %5p [%t] --- %c{1}: %m%n -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-client-test/src/test/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | %d{HH:mm:ss.SSS} [%20.20t{9}] %-5level - %-40.40logger{39} - %msg%n 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-jsonrpc-test/NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-jsonrpc-test/src/main/java/App.java: -------------------------------------------------------------------------------- 1 | public class App {} -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-jsonrpc-test/src/test/java/org/kurento/jsonrpc/test/base/DemoBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.jsonrpc.test.base; 19 | 20 | public class DemoBean { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-jsonrpc-test/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=WARN,stdout 2 | 3 | log4j.logger.org.apache.catalina.startup.DigesterFactory=ERROR 4 | log4j.logger.org.apache=WARN 5 | log4j.logger.org.springframework=WARN 6 | 7 | log4j.logger.org.kurento=DEBUG 8 | log4j.logger.org.kurento.jsonrpc=DEBUG 9 | log4j.logger.org.kurento.kms=DEBUG 10 | 11 | # Appenders 12 | log4j.threshold=ALL 13 | 14 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 15 | log4j.appender.stdout.Target=System.out 16 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 17 | log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %5p [%20.20t] %30.30c{1}: %m%n 18 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-repository-test/NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-repository-test/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | 7 | org.kurento 8 | kurento-integration-tests 9 | 6.18.1-SNAPSHOT 10 | 11 | kurento-repository-test 12 | jar 13 | 14 | 15 | Kurento Integration tests - Repository 16 | Tests for the Kurento Repository project. 17 | 18 | 19 | 20 | 21 | 22 | junit 23 | junit 24 | test 25 | 26 | 27 | org.kurento 28 | kurento-repository-server 29 | 6.14.0 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-repository-test/repository/metadata/metadata.json: -------------------------------------------------------------------------------- 1 | { } -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-repository-test/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-repository-test/test-files/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kurento/kurento-java/9718d0a897541f0183bf515af87afa9593494ff4/kurento-integration-tests/kurento-repository-test/test-files/logo.png -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-repository-test/test-files/sample.txt: -------------------------------------------------------------------------------- 1 | This has some data! 2 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-repository-test/test-files/sampleDownload.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kurento/kurento-java/9718d0a897541f0183bf515af87afa9593494ff4/kurento-integration-tests/kurento-repository-test/test-files/sampleDownload.txt -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-sanity-test/NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-sanity-test/keystore.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kurento/kurento-java/9718d0a897541f0183bf515af87afa9593494ff4/kurento-integration-tests/kurento-sanity-test/keystore.jks -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-sanity-test/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | 7 | org.kurento 8 | kurento-integration-tests 9 | 6.18.1-SNAPSHOT 10 | 11 | kurento-sanity-test 12 | jar 13 | 14 | 15 | Kurento Integration tests - Sanity Tests 16 | 17 | Kurento Sanity Tests. 18 | This project implements a simple evaluation of Kurento. 19 | 20 | 21 | 22 | 23 | 24 | 25 | org.kurento 26 | kurento-client 27 | test 28 | 29 | 30 | junit 31 | junit 32 | test 33 | 34 | 35 | org.slf4j 36 | slf4j-api 37 | 38 | 39 | org.kurento 40 | kurento-test 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-sanity-test/src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | This file is needed to avoid a location problem of the "static" folder 2 | when it is empty. 3 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-sanity-test/src/main/resources/templates/kurento-client.html.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | kurento-client.js sanity test 6 | 7 | 16 | 17 | 18 |

${kurentoLib}

19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-sanity-test/src/test/java/org/kurento/test/sanity/KurentoJsReleaseTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.sanity; 19 | 20 | import static org.kurento.commons.PropertiesManager.getProperty; 21 | 22 | import org.junit.Test; 23 | 24 | /** 25 | * Sanity test for kurento-js releases. 26 | * 27 | * @author Boni Garcia (bgarcia@gsyc.es) 28 | * @since 4.2.5 29 | */ 30 | public class KurentoJsReleaseTest extends KurentoJsBase { 31 | 32 | public KurentoJsReleaseTest() { 33 | 34 | kurentoUrl = getProperty("bower.release.url", DEFAULT_BOWER_RELEASE_URL); 35 | log.debug("kurentoUrl = {}", kurentoUrl); 36 | if (!kurentoUrl.endsWith("/")) { 37 | kurentoUrl += "/"; 38 | } 39 | } 40 | 41 | @Test 42 | public void kurentoJsReleaseTest() { 43 | doTest(); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/base/CompatibilityTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2015 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.base; 19 | 20 | import org.junit.experimental.categories.Category; 21 | import org.kurento.commons.testing.SystemCompatibilityTests; 22 | import org.kurento.test.browser.WebRtcTestPage; 23 | 24 | /** 25 | * Compatibility tests. 26 | * 27 | * @author Boni Garcia (bgarcia@gsyc.es) 28 | * @since 5.0.5 29 | */ 30 | @Category(SystemCompatibilityTests.class) 31 | public class CompatibilityTest extends KurentoClientBrowserTest { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/base/FunctionalTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.base; 19 | 20 | import org.junit.experimental.categories.Category; 21 | import org.kurento.commons.testing.SystemFunctionalTests; 22 | import org.kurento.test.browser.WebRtcTestPage; 23 | 24 | /** 25 | * Functional tests. 26 | * 27 | * @author Boni Garcia (bgarcia@gsyc.es) 28 | * @since 5.0.5 29 | */ 30 | @Category(SystemFunctionalTests.class) 31 | public class FunctionalTest extends KurentoClientBrowserTest { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/base/PlayerTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.base; 19 | 20 | /** 21 | * Base for player tests. 22 | * 23 | * @author Raul Benitez (rbenitez@gsyc.es) 24 | * @since 6.3.1 25 | */ 26 | public class PlayerTest extends BaseTest { 27 | 28 | public PlayerTest() { 29 | setDeleteLogsIfSuccess(false); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/base/QualityTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.base; 19 | 20 | import org.junit.experimental.categories.Category; 21 | import org.kurento.commons.testing.SystemQualityTests; 22 | import org.kurento.test.browser.WebRtcTestPage; 23 | 24 | /** 25 | * Quality tests. 26 | * 27 | * @author Boni Garcia (bgarcia@gsyc.es) 28 | * @since 5.0.5 29 | */ 30 | @Category(SystemQualityTests.class) 31 | public class QualityTest extends KurentoClientBrowserTest { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/base/ScalabilityTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2015 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.base; 19 | 20 | import org.junit.experimental.categories.Category; 21 | import org.kurento.commons.testing.SystemScalabilityTests; 22 | import org.kurento.test.browser.WebRtcTestPage; 23 | 24 | /** 25 | * Scalability tests. 26 | * 27 | * @author Boni Garcia (bgarcia@gsyc.es) 28 | * @since 6.1.1 29 | */ 30 | @Category(SystemScalabilityTests.class) 31 | public class ScalabilityTest extends KurentoClientBrowserTest { 32 | 33 | public ScalabilityTest() { 34 | setDeleteLogsIfSuccess(false); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/browser/BrowserEventListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.browser; 19 | 20 | /** 21 | * Event listener to communicate client and server in tests. 22 | * 23 | * @author Micael Gallego (micael.gallego@gmail.com) 24 | * @since 4.2.3 25 | */ 26 | public interface BrowserEventListener { 27 | 28 | void onEvent(String event); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/browser/BrowserRunner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.browser; 19 | 20 | /** 21 | * Interface used to execute parallel browsers. 22 | * 23 | * @author Micael Gallego (micael.gallego@gmail.com) 24 | * @since 5.0.5 25 | */ 26 | public interface BrowserRunner { 27 | 28 | void run(Browser browser) throws Exception; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/browser/ConsoleLogLevel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.browser; 19 | 20 | /** 21 | * JavaScript console log level. 22 | * 23 | * @author Boni Garcia (bgarcia@gsyc.es) 24 | * @since 5.0.4 25 | */ 26 | public enum ConsoleLogLevel { 27 | INFO, WARN, ERROR; 28 | 29 | @Override 30 | public String toString() { 31 | return this.name().toLowerCase(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/browser/SdpOfferProcessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.browser; 19 | 20 | /** 21 | * SDP offer processor. 22 | * 23 | * @author Micael Gallego (micael.gallego@gmail.com) 24 | * @since 4.2.3 25 | */ 26 | public interface SdpOfferProcessor { 27 | 28 | public String processSdpOffer(String sdpOffer); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/browser/WebRtcIpvMode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.browser; 19 | 20 | /** 21 | * Type of internet protocol version 22 | * 23 | * @author Raul Benitez (rbenitez@gsyc.es) 24 | * @since 6.3.1 25 | */ 26 | public enum WebRtcIpvMode { 27 | IPV4, IPV6, BOTH; 28 | 29 | @Override 30 | public String toString() { 31 | switch (this) { 32 | case IPV4: 33 | return "IPV4"; 34 | case IPV6: 35 | return "IPV6"; 36 | case BOTH: 37 | return "BOTH"; 38 | default: 39 | throw new IllegalArgumentException(); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/config/AudioChannel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.config; 19 | 20 | /** 21 | * Kind of audio (stereo, mono). 22 | * 23 | * @author Boni Garcia (bgarcia@gsyc.es) 24 | * @since 4.2.11 25 | */ 26 | public enum AudioChannel { 27 | STEREO, MONO; 28 | 29 | @Override 30 | public String toString() { 31 | switch (this) { 32 | case MONO: 33 | return "1"; 34 | case STEREO: 35 | default: 36 | return "2"; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/config/BrowserScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2015 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.config; 19 | 20 | /** 21 | * Scope for browser: i) local (installed on machine running the tests; ii) remote (hosts acceded by 22 | * Selenium Grid); iii) In Saucelabs (a private PAAS for testing). 23 | * 24 | * @author Boni Garcia (bgarcia@gsyc.es) 25 | * @since 5.1.0 26 | */ 27 | public enum BrowserScope { 28 | 29 | LOCAL, REMOTE, SAUCELABS, DOCKER, ELASTEST; 30 | 31 | @Override 32 | public String toString() { 33 | return this.name().toLowerCase(); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/config/Protocol.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2015 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.config; 19 | 20 | /** 21 | * Protocol (HTTP, HTTPS, FILE). 22 | * 23 | * @author Boni Garcia (bgarcia@gsyc.es) 24 | * @since 5.1.0 25 | */ 26 | public enum Protocol { 27 | 28 | HTTP, HTTPS, FILE, S3, MONGODB; 29 | 30 | @Override 31 | public String toString() { 32 | return this.name().toLowerCase(); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/config/VideoFormat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2015 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.config; 19 | 20 | /** 21 | * Video Format. 22 | * 23 | * @author Boni Garcia (bgarcia@gsyc.es) 24 | * @since 6.1.1 25 | */ 26 | public enum VideoFormat { 27 | 28 | THIRDGP, AVI, MKV, MOV, MP4, OGV, WEBM; 29 | 30 | @Override 31 | public String toString() { 32 | return this == THIRDGP ? "3gp" : this.name().toLowerCase(); 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/docker/TransportMode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.docker; 19 | 20 | /** 21 | * Type of transport protocol 22 | * 23 | * @author Raul Benitez (rbenitez@gsyc.es) 24 | * @since 6.3.1 25 | */ 26 | public enum TransportMode { 27 | UDP, TCP, BOTH; 28 | 29 | public static TransportMode find(String transportMode) { 30 | for (TransportMode v : values()) { 31 | if (v.toString().equals(transportMode)) { 32 | return v; 33 | } 34 | } 35 | return null; 36 | } 37 | 38 | @Override 39 | public String toString() { 40 | switch (this) { 41 | case UDP: 42 | return "UDP"; 43 | case TCP: 44 | return "TCP"; 45 | case BOTH: 46 | return "BOTH"; 47 | default: 48 | throw new IllegalArgumentException(); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/internal/GetNodeList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2015 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.internal; 19 | 20 | import java.io.IOException; 21 | import java.util.ArrayList; 22 | import java.util.List; 23 | import java.util.regex.Matcher; 24 | import java.util.regex.Pattern; 25 | 26 | import org.kurento.test.grid.GridHandler; 27 | 28 | /** 29 | * Internal utility for reading a node from a URL. 30 | * 31 | * @author Boni Garcia (bgarcia@gsyc.es) 32 | * @since 6.0.1 33 | */ 34 | public class GetNodeList { 35 | 36 | public static void main(String[] args) throws IOException { 37 | List nodeList = new ArrayList<>(); 38 | 39 | for (String url : args) { 40 | String contents = GridHandler.readContents(url); 41 | Pattern p = Pattern.compile(GridHandler.IPS_REGEX); 42 | Matcher m = p.matcher(contents); 43 | while (m.find()) { 44 | nodeList.add(m.group()); 45 | } 46 | } 47 | System.err.println(nodeList); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/internal/KillProcesses.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.internal; 19 | 20 | import java.io.IOException; 21 | 22 | import org.kurento.test.utils.SshConnection; 23 | import org.slf4j.Logger; 24 | import org.slf4j.LoggerFactory; 25 | 26 | /** 27 | * Internal utility for killing all the processes of a user in a remote node (for manual 28 | * testing/debug purposes). 29 | * 30 | * @author Boni Garcia (bgarcia@gsyc.es) 31 | * @since 5.0.5 32 | */ 33 | public class KillProcesses { 34 | 35 | public static Logger log = LoggerFactory.getLogger(KillProcesses.class); 36 | 37 | public static void main(String[] args) throws IOException { 38 | for (String node : args) { 39 | if (SshConnection.ping(node)) { 40 | SshConnection remoteHost = new SshConnection(node); 41 | remoteHost.start(); 42 | remoteHost.execCommand("kill", "-9", "-1"); 43 | } else { 44 | log.error("Node down {}", node); 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/latency/ChangeColorEventListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.latency; 19 | 20 | /** 21 | * Change color event listener. 22 | * 23 | * @author Micael Gallego (micael.gallego@gmail.com) 24 | * @author Boni Garcia (bgarcia@gsyc.es) 25 | * @since 5.0.5 26 | */ 27 | public interface ChangeColorEventListener { 28 | 29 | public void onEvent(E e); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/lifecycle/FailedTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2015 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.lifecycle; 19 | 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | 23 | /** 24 | * Custom annotation for failed tests. 25 | * 26 | * @author Boni Garcia (bgarcia@gsyc.es) 27 | * @since 6.1.1 28 | */ 29 | @Retention(RetentionPolicy.RUNTIME) 30 | public @interface FailedTest { 31 | 32 | } 33 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/lifecycle/FinishedTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2015 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.lifecycle; 19 | 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | 23 | /** 24 | * Custom annotation for finished tests. 25 | * 26 | * @author Boni Garcia (bgarcia@gsyc.es) 27 | * @since 6.1.1 28 | */ 29 | @Retention(RetentionPolicy.RUNTIME) 30 | public @interface FinishedTest { 31 | 32 | } 33 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/lifecycle/FinishedTestClass.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2015 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.lifecycle; 19 | 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | 23 | /** 24 | * Custom annotation for finished test class (called when all tests have finished). 25 | * 26 | * @author Boni Garcia (bgarcia@gsyc.es) 27 | * @since 6.1.1 28 | */ 29 | @Retention(RetentionPolicy.RUNTIME) 30 | public @interface FinishedTestClass { 31 | 32 | } 33 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/lifecycle/KurentoBlockJUnit4ClassRunnerWithParametersFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.lifecycle; 19 | 20 | import org.junit.runner.Runner; 21 | import org.junit.runners.model.InitializationError; 22 | import org.junit.runners.parameterized.BlockJUnit4ClassRunnerWithParametersFactory; 23 | import org.junit.runners.parameterized.TestWithParameters; 24 | 25 | public class KurentoBlockJUnit4ClassRunnerWithParametersFactory 26 | extends BlockJUnit4ClassRunnerWithParametersFactory { 27 | 28 | @Override 29 | public Runner createRunnerForTestWithParameters(TestWithParameters test) 30 | throws InitializationError { 31 | return new KurentoBlockJUnit4ClassRunnerWithParameters(test); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/lifecycle/StartedTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2015 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.lifecycle; 19 | 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | 23 | /** 24 | * Custom annotation for started tests. 25 | * 26 | * @author Boni Garcia (bgarcia@gsyc.es) 27 | * @since 6.1.1 28 | */ 29 | @Retention(RetentionPolicy.RUNTIME) 30 | public @interface StartedTest { 31 | 32 | } 33 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/lifecycle/StartedTestClass.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2015 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.lifecycle; 19 | 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | 23 | /** 24 | * Custom annotation for started test class (called before any tests have been run). 25 | * 26 | * @author Boni Garcia (bgarcia@gsyc.es) 27 | * @since 6.1.1 28 | */ 29 | @Retention(RetentionPolicy.RUNTIME) 30 | public @interface StartedTestClass { 31 | 32 | } 33 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/lifecycle/SucceededTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2015 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.lifecycle; 19 | 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | 23 | /** 24 | * Custom annotation for succeeded tests. 25 | * 26 | * @author Boni Garcia (bgarcia@gsyc.es) 27 | * @since 6.1.1 28 | */ 29 | @Retention(RetentionPolicy.RUNTIME) 30 | public @interface SucceededTest { 31 | 32 | } 33 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/monitor/MonitorStats.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.monitor; 19 | 20 | import java.lang.reflect.Method; 21 | 22 | public class MonitorStats { 23 | 24 | protected boolean isGetter(Method method) { 25 | return (method.getName().startsWith("get") || method.getName().startsWith("is")) 26 | && !method.getName().equals("getClass"); 27 | } 28 | 29 | protected String getGetterName(Method method) { 30 | String name = method.getName(); 31 | if (name.startsWith("get")) { 32 | name = name.substring(3); 33 | } else if (name.startsWith("is")) { 34 | name = name.substring(2); 35 | } 36 | return name; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/monitor/PeerConnectionStats.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.monitor; 19 | 20 | import java.util.ArrayList; 21 | import java.util.List; 22 | import java.util.Map; 23 | 24 | public class PeerConnectionStats extends MonitorStats { 25 | 26 | private Map stats; 27 | 28 | public PeerConnectionStats(Map stats) { 29 | this.stats = stats; 30 | } 31 | 32 | public Map getStats() { 33 | return stats; 34 | } 35 | 36 | public List calculateHeaders() { 37 | return new ArrayList<>(stats.keySet()); 38 | } 39 | 40 | public List calculateValues(List headers) { 41 | 42 | List values = new ArrayList<>(); 43 | for (String header : headers) { 44 | values.add(stats.get(header)); 45 | } 46 | return values; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/services/Service.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2015 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.services; 19 | 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | 23 | /** 24 | * Annotation to identify test service runners. 25 | * 26 | * @author Boni Garcia (bgarcia@gsyc.es) 27 | * @since 6.1.1 28 | */ 29 | @Retention(RetentionPolicy.RUNTIME) 30 | public @interface Service { 31 | 32 | int value() default 1; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/services/TestService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2015 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.services; 19 | 20 | import org.slf4j.Logger; 21 | import org.slf4j.LoggerFactory; 22 | 23 | /** 24 | * Abstract tect service. 25 | * 26 | * @author Boni Garcia (bgarcia@gsyc.es) 27 | * @since 6.1.1 28 | */ 29 | public abstract class TestService { 30 | 31 | public static Logger log = LoggerFactory.getLogger(TestService.class); 32 | 33 | public enum TestServiceScope { 34 | TEST, TESTCLASS, TESTSUITE, EXTERNAL; 35 | } 36 | 37 | public TestServiceScope scope = TestServiceScope.TEST; 38 | 39 | public abstract TestServiceScope getScope(); 40 | 41 | public void start() { 42 | log.debug("[+] Starting {} (scope={})", this.getClass().getSimpleName(), getScope()); 43 | } 44 | 45 | public void stop() { 46 | log.debug("[-] Stopping {} (scope={})", this.getClass().getSimpleName(), getScope()); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/utils/Randomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.utils; 19 | 20 | import java.util.Random; 21 | 22 | /** 23 | * Random number generator. 24 | * 25 | * @author Boni Garcia (bgarcia@gsyc.es) 26 | * @since 4.2.5 27 | */ 28 | public class Randomizer { 29 | 30 | public static int getInt(int lowerbound, int upperbound) { 31 | Random rand = new Random(System.nanoTime()); 32 | return rand.nextInt(upperbound - lowerbound) + lowerbound; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/java/org/kurento/test/utils/WebRtcConnector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.utils; 19 | 20 | import org.kurento.client.WebRtcEndpoint; 21 | 22 | public interface WebRtcConnector { 23 | 24 | public void connect(WebRtcEndpoint inputEndpoint, WebRtcEndpoint outputEndpoint); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port: 8443 2 | server.ssl.key-store: classpath:keystore.jks 3 | server.ssl.key-store-password: kurento 4 | server.ssl.keyStoreType: JKS 5 | server.ssl.keyAlias: kurento-selfsigned 6 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/resources/default.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "executions": [ 3 | { 4 | "browser": { 5 | "scope": "local", 6 | "browser": "chrome", 7 | "path": "/webrtc.html" 8 | } 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/resources/keystore.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kurento/kurento-java/9718d0a897541f0183bf515af87afa9593494ff4/kurento-integration-tests/kurento-test/src/main/resources/keystore.jks -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Define the root logger with file appender 2 | log4j.rootLogger = INFO, stdout 3 | log4j.logger.org.apache.catalina.startup.DigesterFactory=ERROR 4 | log4j.logger.org.apache=WARN 5 | log4j.logger.org.springframework=WARN 6 | log4j.logger.org.kurento=DEBUG 7 | log4j.logger.org.kurento.test.Shell=WARN 8 | 9 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 10 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 11 | log4j.appender.stdout.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss.SSS}] boot%X{context} - ${PID} %5p [%t] --- %c{1}: %m%n -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | %d{HH:mm:ss.SSS} [%20.20t{9}] %-5level - %-40.40logger{39} - %msg%n 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/resources/static/img/html5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kurento/kurento-java/9718d0a897541f0183bf515af87afa9593494ff4/kurento-integration-tests/kurento-test/src/main/resources/static/img/html5.png -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/resources/static/img/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kurento/kurento-java/9718d0a897541f0183bf515af87afa9593494ff4/kurento-integration-tests/kurento-test/src/main/resources/static/img/spinner.gif -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/resources/static/img/transparent-1px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kurento/kurento-java/9718d0a897541f0183bf515af87afa9593494ff4/kurento-integration-tests/kurento-test/src/main/resources/static/img/transparent-1px.png -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/resources/static/img/webrtc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kurento/kurento-java/9718d0a897541f0183bf515af87afa9593494ff4/kurento-integration-tests/kurento-test/src/main/resources/static/img/webrtc.png -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/resources/templates/kurento.conf.json.ftl: -------------------------------------------------------------------------------- 1 | { 2 | "metadata" : { 3 | "publicIp" : "127.0.0.1" 4 | }, 5 | "mediaServer" : { 6 | "net" : { 7 | "websocket": { 8 | "port": ${wsPort}, 9 | "path": "${wsPath}", 10 | "threads": 10 11 | <#if registrar??> 12 | ,"registrar": { 13 | "address": "${registrar}", 14 | "localAddress": "${registrarLocalAddress}" 15 | } 16 | 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/resources/templates/kurento.sh.ftl: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export GST_PLUGIN_PATH=$GST_PLUGIN_PATH:${gstPlugins} 4 | export GST_DEBUG=${debugOptions} 5 | nohup ${serverCommand} --gst-debug-no-color -f ${workspace}kurento.conf.json -c /etc/kurento/modules -d ${workspace}logs & 6 | echo $! > ${workspace}kms-pid -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/main/resources/templates/launch-node.sh.ftl: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | xvfb-run -s "-screen 0 1224x768x16" java -cp ${classpath} org.openqa.grid.selenium.GridLauncher -port ${remotePort} -role node -hub http://${hubIp}:${hubPort}/grid/register -browser browserName=${browser},maxInstances=${maxInstances} -maxSession ${maxInstances} -Dwebdriver.chrome.driver=${remoteChromeDriver} -timeout 0 & 4 | echo $! > ${tmpFolder}/${pidFile} 5 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/test/java/org/kurento/test/BrowserLogTest.java: -------------------------------------------------------------------------------- 1 | 2 | package org.kurento.test; 3 | 4 | import java.util.Collection; 5 | 6 | import org.junit.Assert; 7 | import org.junit.Test; 8 | import org.junit.runners.Parameterized.Parameters; 9 | import org.kurento.test.base.KurentoClientBrowserTest; 10 | import org.kurento.test.browser.WebRtcTestPage; 11 | import org.kurento.test.config.TestScenario; 12 | 13 | public class BrowserLogTest extends KurentoClientBrowserTest { 14 | 15 | @Parameters(name = "{index}: {0}") 16 | public static Collection data() { 17 | return TestScenario.localChromeAndFirefox(); 18 | } 19 | 20 | @Test 21 | public void test() throws Exception { 22 | getPage().browser.executeScript("console.log('This is a log message');"); 23 | getPage().browser.executeScript("console.info('This is a info message');"); 24 | getPage().browser.executeScript("console.error('This is an error message');"); 25 | getPage().browser.executeScript("console.warn('This is a warning');"); 26 | 27 | Assert.assertTrue(false); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /kurento-integration-tests/kurento-test/src/test/java/org/kurento/test/functional/player/FunctionalPlayerTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.test.functional.player; 19 | 20 | import org.junit.experimental.categories.Category; 21 | import org.kurento.commons.testing.SystemFunctionalTests; 22 | 23 | @Category(SystemFunctionalTests.class) 24 | public class FunctionalPlayerTest extends SimplePlayer { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-client/NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-client/src/main/java/org/kurento/jsonrpc/JsonRpcException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.jsonrpc; 19 | 20 | import org.kurento.commons.exception.KurentoException; 21 | 22 | /** 23 | * This is a general exception used in the JsonRpcConnector package. 24 | * 25 | * @author Ivan Gracia (izanmail@gmail.com) 26 | * @since 4.2.3 27 | */ 28 | public class JsonRpcException extends KurentoException { 29 | 30 | private static final long serialVersionUID = -9166377169939591329L; 31 | 32 | public JsonRpcException(String message, Throwable cause) { 33 | super(message, cause); 34 | } 35 | 36 | public JsonRpcException(String message) { 37 | super(message); 38 | } 39 | 40 | public JsonRpcException(Throwable cause) { 41 | super(cause); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-client/src/main/java/org/kurento/jsonrpc/JsonRpcMethod.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package org.kurento.jsonrpc; 18 | 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | 22 | @Retention(RetentionPolicy.RUNTIME) 23 | public @interface JsonRpcMethod { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-client/src/main/java/org/kurento/jsonrpc/Prop.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.jsonrpc; 19 | 20 | public interface Prop { 21 | 22 | String getName(); 23 | 24 | Object getValue(); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-client/src/main/java/org/kurento/jsonrpc/PropImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.jsonrpc; 19 | 20 | public class PropImpl implements Prop { 21 | 22 | private final String name; 23 | private final Object value; 24 | 25 | public PropImpl(String name, Object value) { 26 | this.name = name; 27 | this.value = value; 28 | } 29 | 30 | @Override 31 | public String getName() { 32 | return name; 33 | } 34 | 35 | @Override 36 | public Object getValue() { 37 | return value; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-client/src/main/java/org/kurento/jsonrpc/Session.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.jsonrpc; 19 | 20 | import java.io.IOException; 21 | import java.util.Map; 22 | 23 | import org.kurento.jsonrpc.internal.JsonRpcRequestSender; 24 | 25 | public interface Session extends JsonRpcRequestSender { 26 | 27 | public String getSessionId(); 28 | 29 | public Object getRegisterInfo(); 30 | 31 | public boolean isNew(); 32 | 33 | public void close() throws IOException; 34 | 35 | void setReconnectionTimeout(long millis); 36 | 37 | public Map getAttributes(); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-client/src/main/java/org/kurento/jsonrpc/TransportException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.jsonrpc; 19 | 20 | /** 21 | * This exception occurs when there is a communication error. This could happen either when trying 22 | * to reach KMS, or when the server is trying to send a response to the client. 23 | * 24 | * @author Ivan Gracia (izanmail@gmail.com) 25 | * @since 4.2.1 26 | * 27 | */ 28 | public class TransportException extends JsonRpcException { 29 | 30 | private static final long serialVersionUID = -9166377169939591329L; 31 | 32 | public TransportException(String message, Throwable cause) { 33 | super(message, cause); 34 | } 35 | 36 | public TransportException(String message) { 37 | super(message); 38 | } 39 | 40 | public TransportException(Throwable cause) { 41 | super(cause); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-client/src/main/java/org/kurento/jsonrpc/client/AbstractJsonRpcWebSocketClientHandler.java: -------------------------------------------------------------------------------- 1 | 2 | package org.kurento.jsonrpc.client; 3 | 4 | import io.netty.channel.ChannelFuture; 5 | import io.netty.channel.ChannelPromise; 6 | import io.netty.channel.SimpleChannelInboundHandler; 7 | import io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker; 8 | 9 | public abstract class AbstractJsonRpcWebSocketClientHandler 10 | extends SimpleChannelInboundHandler { 11 | 12 | protected final WebSocketClientHandshaker handshaker; 13 | protected ChannelPromise handshakeFuture; 14 | 15 | public AbstractJsonRpcWebSocketClientHandler(WebSocketClientHandshaker handshaker) { 16 | this.handshaker = handshaker; 17 | } 18 | 19 | public ChannelFuture handshakeFuture() { 20 | return handshakeFuture; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-client/src/main/java/org/kurento/jsonrpc/client/Continuation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.jsonrpc.client; 19 | 20 | /** 21 | * This interface is to be used in asynchronous calls to the media server. 22 | * 23 | * @param 24 | * The data type of the callback´s response in case of successful outcome. 25 | * 26 | * @author Luis López (llopez@gsyc.es) 27 | * @author Ivan Gracia (igracia@gsyc.es) 28 | * @since 2.0.0 29 | */ 30 | public interface Continuation { 31 | 32 | /** 33 | * This method is called when the operation succeeds 34 | * 35 | * @param result 36 | */ 37 | void onSuccess(F result); 38 | 39 | /** 40 | * This method gets called when the operation fails 41 | * 42 | * @param cause 43 | * The cause of the failure 44 | */ 45 | void onError(Throwable cause); 46 | 47 | } 48 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-client/src/main/java/org/kurento/jsonrpc/client/Handler.java: -------------------------------------------------------------------------------- 1 | package org.kurento.jsonrpc.client; 2 | 3 | public interface Handler { 4 | public void run(); 5 | } -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-client/src/main/java/org/kurento/jsonrpc/client/JsonRcpServiceAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.jsonrpc.client; 19 | 20 | public class JsonRcpServiceAdapter { 21 | 22 | public static S createService(Class clazz) { 23 | return null; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-client/src/main/java/org/kurento/jsonrpc/client/JsonRpcWSConnectionAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package org.kurento.jsonrpc.client; 18 | 19 | public class JsonRpcWSConnectionAdapter implements JsonRpcWSConnectionListener { 20 | 21 | @Override 22 | public void connected() { 23 | } 24 | 25 | @Override 26 | public void connectionFailed() { 27 | } 28 | 29 | @Override 30 | public void disconnected() { 31 | } 32 | 33 | @Override 34 | public void reconnected(boolean sameServer) { 35 | } 36 | 37 | @Override 38 | public void reconnecting() { 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-client/src/main/java/org/kurento/jsonrpc/client/JsonRpcWSConnectionListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.jsonrpc.client; 19 | 20 | public interface JsonRpcWSConnectionListener { 21 | 22 | /** 23 | * Method invoked when the JsonRpcWS client successfully connects to the server 24 | */ 25 | void connected(); 26 | 27 | /** 28 | * Method invoked when the JsonRpcWS client could not connect to the server. This method can be 29 | * invoked also if a reconnection is needed. 30 | */ 31 | void connectionFailed(); 32 | 33 | /** 34 | * Method invoked when the JsonRpcWS client connection with the server is interrupted 35 | */ 36 | void disconnected(); 37 | 38 | /** 39 | * Method invoked when the JsonRpcWS client is reconnected to a server 40 | */ 41 | void reconnected(boolean sameServer); 42 | 43 | /** 44 | * Method invoked when the JsonRpcWS client is disconnected from a server and it is trying to 45 | * reconnect 46 | */ 47 | void reconnecting(); 48 | 49 | } 50 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-client/src/main/java/org/kurento/jsonrpc/client/ReconnectedHandler.java: -------------------------------------------------------------------------------- 1 | package org.kurento.jsonrpc.client; 2 | 3 | public interface ReconnectedHandler { 4 | public void run(boolean sameServer); 5 | } -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-client/src/main/java/org/kurento/jsonrpc/client/RequestAlreadyRespondedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.jsonrpc.client; 19 | 20 | import org.kurento.jsonrpc.JsonRpcException; 21 | 22 | /** 23 | * This exception occurs when there is a communication error. This could happen either when trying 24 | * to reach KMS, or when the server is trying to send a response to the client. 25 | * 26 | * @author Ivan Gracia (izanmail@gmail.com) 27 | * @since 4.2.1 28 | * 29 | */ 30 | public class RequestAlreadyRespondedException extends JsonRpcException { 31 | 32 | private static final long serialVersionUID = -9166377169939591329L; 33 | 34 | public RequestAlreadyRespondedException(String message, Throwable cause) { 35 | super(message, cause); 36 | } 37 | 38 | public RequestAlreadyRespondedException(String message) { 39 | super(message); 40 | } 41 | 42 | public RequestAlreadyRespondedException(Throwable cause) { 43 | super(cause); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-client/src/main/java/org/kurento/jsonrpc/client/WebSocketClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | package org.kurento.jsonrpc.client; 18 | 19 | import java.io.IOException; 20 | import java.util.concurrent.TimeoutException; 21 | 22 | public interface WebSocketClient { 23 | 24 | void sendTextMessage(String jsonMessage) throws IOException; 25 | 26 | void closeNativeClient(); 27 | 28 | boolean isNativeClientConnected(); 29 | 30 | void connectNativeClient() throws TimeoutException, Exception; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-demo-server/NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-demo-server/package/config/kjrserver-log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=INFO,CONSOLE,file 2 | log4j.logger.org.kurento=DEBUG 3 | 4 | # Appenders 5 | log4j.threshold=ALL 6 | 7 | log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender 8 | log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout 9 | log4j.appender.CONSOLE.layout.ConversionPattern=%d{HH:mm:ss} %-5p %c [%t] (%F:%L) - %m%n 10 | 11 | log4j.appender.file=org.apache.log4j.RollingFileAppender 12 | log4j.appender.file.File=${kjrserver.log.file} 13 | log4j.appender.file.ImmediateFlush=true 14 | log4j.appender.file.MaxFileSize=10MB 15 | log4j.appender.file.MaxBackupIndex=50 16 | log4j.appender.file.layout=org.apache.log4j.PatternLayout 17 | log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2} (%M(%L)) - %m%n 18 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-demo-server/package/config/kjrserver.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | } -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-demo-server/package/support-files/kjrserver.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=KJRServer daemon 3 | After=network.target 4 | 5 | [Service] 6 | User=nobody 7 | ExecStart=/usr/bin/kjrserver 8 | 9 | [Install] 10 | WantedBy=default.target -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-demo-server/src/assembly/bin.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | bin 6 | 7 | zip 8 | 9 | 10 | 11 | 12 | 13 | 14 | target/${project.artifactId}-${project.version}.jar 15 | lib 16 | 17 | kjrserver.jar 18 | 19 | 20 | 21 | 22 | 23 | package 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-demo-server/src/main/java/org/kurento/jsonrpc/handler/EchoJsonRpcHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2013 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.kurento.jsonrpc.handler; 18 | 19 | import org.kurento.jsonrpc.DefaultJsonRpcHandler; 20 | import org.kurento.jsonrpc.Transaction; 21 | import org.kurento.jsonrpc.message.Request; 22 | import org.slf4j.Logger; 23 | import org.slf4j.LoggerFactory; 24 | 25 | import com.google.gson.JsonObject; 26 | 27 | public class EchoJsonRpcHandler extends DefaultJsonRpcHandler { 28 | 29 | private static Logger log = LoggerFactory.getLogger(EchoJsonRpcHandler.class); 30 | 31 | @Override 32 | public void handleRequest(Transaction transaction, Request request) throws Exception { 33 | 34 | log.debug("Request id:" + request.getId()); 35 | log.debug("Request method:" + request.getMethod()); 36 | log.debug("Request params:" + request.getParams()); 37 | 38 | transaction.sendResponse(request.getParams()); 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-demo-server/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | 2 | .------------------------------------. 3 | | | 4 | | | |/ / _ _ _ ___ _ _| |_ ___ | 5 | | | ' < || | '_/ -_) ' \ _/ _ \ | 6 | | |_|\_\_,_|_| \___|_||_\__\___/ | 7 | | | 8 | '------------------------------------' 9 | ${project.name} 10 | Version ${project.version} 11 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-demo-server/src/main/resources/kjrserver.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | } -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-demo-server/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=INFO,CONSOLE 2 | log4j.logger.org.kurento=DEBUG 3 | 4 | # Appenders 5 | log4j.threshold=ALL 6 | 7 | log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender 8 | log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout 9 | log4j.appender.CONSOLE.layout.ConversionPattern=%d{HH:mm:ss} %-5p %c [%t] (%F:%L) - %m%n 10 | 11 | log4j.appender.file=org.apache.log4j.RollingFileAppender 12 | log4j.appender.file.File=${user.home}/kurento-jsonrpc-echo.log 13 | log4j.appender.file.ImmediateFlush=true 14 | log4j.appender.file.MaxFileSize=10MB 15 | log4j.appender.file.MaxBackupIndex=50 16 | log4j.appender.file.layout=org.apache.log4j.PatternLayout 17 | log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2} (%M(%L)) - %m%n 18 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-server/NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-server/src/main/java/org/kurento/jsonrpc/internal/server/NativeSessionHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.jsonrpc.internal.server; 19 | 20 | import org.kurento.jsonrpc.Session; 21 | 22 | /** 23 | * This interface will be implemented by JsonRpcHandlers that want a low level handling of requests 24 | * with unknown sessionId. It is specially useful in clustered environments when session can be 25 | * stored in other data structures 26 | * 27 | * @author micael.gallego@gmail.com 28 | */ 29 | public interface NativeSessionHandler { 30 | 31 | public boolean isSessionKnown(String sessionId); 32 | 33 | public void processNewCreatedKnownSession(Session session); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-server/src/main/java/org/kurento/jsonrpc/server/JsonRpcConfigurer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.jsonrpc.server; 19 | 20 | import org.kurento.jsonrpc.JsonRpcHandler; 21 | 22 | public interface JsonRpcConfigurer { 23 | 24 | /** 25 | * Register {@link JsonRpcHandler}s. 26 | * 27 | * @param registry 28 | * a JSON RPC handler registry 29 | */ 30 | void registerJsonRpcHandlers(JsonRpcHandlerRegistry registry); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-server/src/main/java/org/kurento/jsonrpc/server/JsonRpcHandlerRegistration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.jsonrpc.server; 19 | 20 | import org.kurento.jsonrpc.JsonRpcHandler; 21 | 22 | /** 23 | * Provides methods for configuring a JsonRpcHandler handler. 24 | */ 25 | public interface JsonRpcHandlerRegistration { 26 | 27 | /** 28 | * Add more handlers that will share the same configuration 29 | * 30 | * @param handler 31 | * the handler to register 32 | * @param paths 33 | * paths to register the handler in 34 | * @return the handler registration 35 | */ 36 | JsonRpcHandlerRegistration addHandler(JsonRpcHandler handler, String... paths); 37 | 38 | } -------------------------------------------------------------------------------- /kurento-jsonrpc/kurento-jsonrpc-server/src/main/java/org/kurento/jsonrpc/server/JsonRpcHandlerRegistry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.jsonrpc.server; 19 | 20 | import org.kurento.jsonrpc.JsonRpcHandler; 21 | 22 | public interface JsonRpcHandlerRegistry { 23 | 24 | /** 25 | * Configure a JsonRpcHandler at the specified URL paths. 26 | * 27 | * @param jsonRpcHandler 28 | * @param paths 29 | * @return The handler registration object 30 | */ 31 | JsonRpcHandlerRegistration addHandler(JsonRpcHandler jsonRpcHandler, String... paths); 32 | 33 | JsonRpcHandlerRegistration addPerSessionHandler(Class> handlerClass, 34 | String... string); 35 | 36 | JsonRpcHandlerRegistration addPerSessionHandler(String beanName, String... string); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /kurento-parent-pom/NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-repository/NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-client/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | 7 | org.kurento 8 | kurento-repository 9 | 6.18.1-SNAPSHOT 10 | 11 | kurento-repository-client 12 | jar 13 | 14 | 15 | Kurento Repository Client 16 | 17 | The Kurento Repository Client project publishes a Java API to repository 18 | services in Kurento. 19 | 20 | 21 | 22 | 23 | 24 | 25 | org.kurento 26 | kurento-commons 27 | 28 | 29 | 30 | com.squareup.retrofit 31 | retrofit 32 | 1.9.0 33 | 34 | 35 | 36 | 37 | 38 | 39 | src/main/resources 40 | false 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-client/src/main/java/org/kurento/repository/RepositoryUrlLoader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.repository; 19 | 20 | import java.nio.file.Path; 21 | 22 | import org.kurento.commons.UrlServiceLoader; 23 | 24 | public class RepositoryUrlLoader extends UrlServiceLoader { 25 | 26 | public static final String REPOSITORY_URL_PROPERTY = "repository.url"; 27 | public static final String REPOSITORY_URL_PROVIDER_PROPERTY = "repository.url.provider"; 28 | public static final String DEFAULT_REPOSITORY_URL = "http://localhost:7676"; 29 | 30 | public RepositoryUrlLoader(Path configFile) { 31 | super(configFile, REPOSITORY_URL_PROPERTY, REPOSITORY_URL_PROVIDER_PROPERTY, 32 | DEFAULT_REPOSITORY_URL); 33 | } 34 | 35 | public String getRepositoryUrl() { 36 | if (getStaticUrl() == null) { 37 | return getServiceProvider().getRepositoryUrl(); 38 | } else { 39 | return getStaticUrl(); 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-client/src/main/java/org/kurento/repository/RepositoryUrlProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2016 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.repository; 19 | 20 | public interface RepositoryUrlProvider { 21 | 22 | public String getRepositoryUrl(); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-client/src/main/java/org/kurento/repository/service/pojo/RepositoryItemEndpoint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.repository.service.pojo; 19 | 20 | /** 21 | * Root class for the repository's REST POJO's. 22 | * 23 | * @author Radu Tom Vlad 24 | */ 25 | abstract class RepositoryItemEndpoint { 26 | private String id; 27 | private String url; 28 | 29 | public final String getId() { 30 | return id; 31 | } 32 | 33 | public final void setId(String id) { 34 | this.id = id; 35 | } 36 | 37 | public final String getUrl() { 38 | return url; 39 | } 40 | 41 | public final void setUrl(String url) { 42 | this.url = url; 43 | } 44 | 45 | @Override 46 | public final String toString() { 47 | return "[id=" + id + ", url=" + url + "]"; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-client/src/main/java/org/kurento/repository/service/pojo/RepositoryItemPlayer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.repository.service.pojo; 19 | 20 | /** 21 | * POJO representing an Http endpoint of a RepositoryItem that can be used for playing 22 | * (retrieving) multimedia. 23 | * 24 | * @author Radu Tom Vladm 25 | */ 26 | public class RepositoryItemPlayer extends RepositoryItemEndpoint { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-client/src/main/java/org/kurento/repository/service/pojo/RepositoryItemRecorder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.repository.service.pojo; 19 | 20 | /** 21 | * POJO representing an Http endpoint of a RepositoryItem that can be used for recording 22 | * multimedia. 23 | * 24 | * @author Radu Tom Vlad 25 | */ 26 | public class RepositoryItemRecorder extends RepositoryItemEndpoint { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-internal/NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-internal/src/main/java/org/kurento/repository/DuplicateItemException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.repository; 19 | 20 | import org.kurento.commons.exception.KurentoException; 21 | 22 | /** 23 | * This exception is thrown when the user is trying to create a repository item with the same id 24 | * than existing repository item. 25 | * 26 | * @author Micael Gallego (micael.gallego@gmail.com) 27 | * 28 | */ 29 | public class DuplicateItemException extends KurentoException { 30 | 31 | private static final long serialVersionUID = 3515920000618086477L; 32 | 33 | public DuplicateItemException(String id) { 34 | super("An item with id " + id + " already exists"); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-internal/src/main/java/org/kurento/repository/HttpSessionStartedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.repository; 19 | 20 | /** 21 | * This class represents an event fired when an client is connected to the 22 | * {@link RepositoryHttpEndpoint} identified as source. 23 | * 24 | * @author Micael Gallego (micael.gallego@gmail.com) 25 | */ 26 | public class HttpSessionStartedEvent extends RepositoryHttpSessionEvent { 27 | 28 | public HttpSessionStartedEvent(RepositoryHttpEndpoint source) { 29 | super(source); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-internal/src/main/java/org/kurento/repository/RepositoryHttpEndpointFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.repository; 19 | 20 | public interface RepositoryHttpEndpointFactory { 21 | 22 | public RepositoryHttpPlayer createRepositoryHttpPlayer(); 23 | 24 | public RepositoryHttpRecorder createRepositoryHttpRecorder(); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-internal/src/main/java/org/kurento/repository/RepositoryHttpEventListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.repository; 19 | 20 | public interface RepositoryHttpEventListener { 21 | 22 | void onEvent(E event); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-internal/src/main/java/org/kurento/repository/RepositoryHttpPlayer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.repository; 19 | 20 | public interface RepositoryHttpPlayer extends RepositoryHttpEndpoint { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-internal/src/main/java/org/kurento/repository/RepositoryHttpRecorder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.repository; 19 | 20 | public interface RepositoryHttpRecorder extends RepositoryHttpEndpoint { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-internal/src/main/java/org/kurento/repository/RepositoryHttpSessionEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.repository; 19 | 20 | public class RepositoryHttpSessionEvent { 21 | 22 | private RepositoryHttpEndpoint source; 23 | 24 | public RepositoryHttpSessionEvent(RepositoryHttpEndpoint source) { 25 | this.source = source; 26 | } 27 | 28 | public RepositoryHttpEndpoint getSource() { 29 | return source; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-internal/src/main/java/org/kurento/repository/internal/RepositoryHttpPlayerImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.repository.internal; 19 | 20 | import org.kurento.repository.RepositoryHttpPlayer; 21 | import org.kurento.repository.RepositoryItem; 22 | import org.kurento.repository.internal.http.RepositoryHttpManager; 23 | 24 | public class RepositoryHttpPlayerImpl extends RepositoryHttpEndpointImpl 25 | implements RepositoryHttpPlayer { 26 | 27 | public RepositoryHttpPlayerImpl(RepositoryItem repositoryItem, String id, String url, 28 | RepositoryHttpManager httpManager) { 29 | super(repositoryItem, id, url, httpManager); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-internal/src/main/java/org/kurento/repository/internal/RepositoryHttpRecorderImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.repository.internal; 19 | 20 | import org.kurento.repository.RepositoryHttpRecorder; 21 | import org.kurento.repository.RepositoryItem; 22 | import org.kurento.repository.internal.http.RepositoryHttpManager; 23 | 24 | public class RepositoryHttpRecorderImpl extends RepositoryHttpEndpointImpl 25 | implements RepositoryHttpRecorder { 26 | 27 | public RepositoryHttpRecorderImpl(RepositoryItem repositoryItem, String id, String url, 28 | RepositoryHttpManager httpManager) { 29 | super(repositoryItem, id, url, httpManager); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-internal/src/main/java/org/kurento/repository/internal/repoimpl/RepositoryWithHttp.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.repository.internal.repoimpl; 19 | 20 | import org.kurento.repository.Repository; 21 | import org.kurento.repository.internal.http.RepositoryHttpManager; 22 | 23 | public interface RepositoryWithHttp extends Repository { 24 | 25 | public RepositoryHttpManager getRepositoryHttpManager(); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-server/NOTICE: -------------------------------------------------------------------------------- 1 | (C) Copyright 2016 Kurento (https://kurento.openvidu.io/) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-server/package/config/kurento-repo-log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=INFO,CONSOLE,file 2 | log4j.logger.org.kurento=DEBUG 3 | 4 | # Appenders 5 | log4j.threshold=ALL 6 | 7 | log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender 8 | log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout 9 | log4j.appender.CONSOLE.layout.ConversionPattern=%d{HH:mm:ss} %-5p %c [%t] (%F:%L) - %m%n 10 | 11 | log4j.appender.file=org.apache.log4j.RollingFileAppender 12 | log4j.appender.file.File=${kurento-repo.log.file} 13 | log4j.appender.file.ImmediateFlush=true 14 | log4j.appender.file.MaxFileSize=10MB 15 | log4j.appender.file.MaxBackupIndex=50 16 | log4j.appender.file.layout=org.apache.log4j.PatternLayout 17 | log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2} (%M(%L)) - %m%n 18 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-server/package/config/kurento-repo.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "repository": { 3 | "port": 7676, 4 | "hostname": "127.0.0.1", 5 | 6 | "//": "mongodb or filesystem", 7 | "type": "mongodb", 8 | 9 | "mongodb": { 10 | "dbName": "kurento", 11 | "gridName": "kfs", 12 | "urlConn": "mongodb://localhost" 13 | }, 14 | "filesystem": { 15 | "folder": "/tmp/repository" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-server/package/support-files/kurento-repo.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Kurento repository daemon 3 | After=network.target 4 | 5 | [Service] 6 | User=nobody 7 | ExecStart=/usr/bin/kurento-repo 8 | 9 | [Install] 10 | WantedBy=default.target -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-server/repository/metadata/metadata.json: -------------------------------------------------------------------------------- 1 | { } -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-server/src/assembly/bin.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | bin 6 | 7 | zip 8 | 9 | 10 | 11 | 12 | 13 | 14 | target/${project.artifactId}-${project.version}.jar 15 | lib 16 | 17 | kurento-repo.jar 18 | 19 | 20 | 21 | 22 | 23 | package 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-server/src/main/java/org/kurento/repository/ItemNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2013 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | package org.kurento.repository; 19 | 20 | /** 21 | * Thrown when a repository item is not found using the provided id. 22 | * 23 | * @author Radu Tom Vlad 24 | */ 25 | public class ItemNotFoundException extends Exception { 26 | private static final long serialVersionUID = 1L; 27 | 28 | public ItemNotFoundException(String msg) { 29 | super(msg); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-server/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | 2 | .------------------------------------. 3 | | | 4 | | | |/ / _ _ _ ___ _ _| |_ ___ | 5 | | | ' < || | '_/ -_) ' \ _/ _ \ | 6 | | |_|\_\_,_|_| \___|_||_\__\___/ | 7 | | | 8 | '------------------------------------' 9 | ${project.name} 10 | Version ${project.version} 11 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-server/src/main/resources/kurento-repo.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "repository": { 3 | "port": 7676, 4 | "hostname": "127.0.0.1", 5 | 6 | "//": "mongodb or filesystem", 7 | "type": "mongodb", 8 | 9 | "mongodb": { 10 | "dbName": "kurento", 11 | "gridName": "kfs", 12 | "urlConn": "mongodb://localhost" 13 | }, 14 | "filesystem": { 15 | "folder": "/tmp/repository" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-server/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=INFO,CONSOLE 2 | log4j.logger.org.kurento=DEBUG 3 | 4 | # Appenders 5 | log4j.threshold=ALL 6 | 7 | log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender 8 | log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout 9 | log4j.appender.CONSOLE.layout.ConversionPattern=%d{HH:mm:ss} %-5p %c [%t] (%F:%L) - %m%n 10 | 11 | log4j.appender.file=org.apache.log4j.RollingFileAppender 12 | log4j.appender.file.File=${kurento-repo.log.file} 13 | log4j.appender.file.ImmediateFlush=true 14 | log4j.appender.file.MaxFileSize=10MB 15 | log4j.appender.file.MaxBackupIndex=50 16 | log4j.appender.file.layout=org.apache.log4j.PatternLayout 17 | log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2} (%M(%L)) - %m%n 18 | -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-server/test-files/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kurento/kurento-java/9718d0a897541f0183bf515af87afa9593494ff4/kurento-repository/kurento-repository-server/test-files/logo.png -------------------------------------------------------------------------------- /kurento-repository/kurento-repository-server/test-files/sample.txt: -------------------------------------------------------------------------------- 1 | This has some data! 2 | -------------------------------------------------------------------------------- /maven-settings/README.md: -------------------------------------------------------------------------------- 1 | # Maven settings.xml for CI 2 | 3 | This `settings.xml` file is meant to be stored as a *Jenkins Managed File*, and loaded by all jobs that build Java projects. 4 | 5 | See the Jenkins [Config File Management](https://ci.openvidu.io/jenkins/configfiles/index) section, where this file is managed under the name "*Kurento GitHub Maven settings.xml*". 6 | --------------------------------------------------------------------------------