From 3c5c2596bae0f5c6ee1b46ea606afa91bc5559f3 Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Wed, 27 Jun 2018 14:47:21 +0200 Subject: [PATCH] openvidu-server: license header added to every COTURN service class --- .../java/io/openvidu/server/OpenViduServer.java | 14 ++++++++------ .../coturn/BashCoturnCredentialsService.java | 17 +++++++++++++++++ .../server/coturn/CoturnCredentialsService.java | 17 +++++++++++++++++ .../coturn/CoturnCredentialsServiceFactory.java | 17 +++++++++++++++++ .../openvidu/server/coturn/TurnCredentials.java | 17 +++++++++++++++++ 5 files changed, 76 insertions(+), 6 deletions(-) diff --git a/openvidu-server/src/main/java/io/openvidu/server/OpenViduServer.java b/openvidu-server/src/main/java/io/openvidu/server/OpenViduServer.java index 1febd1da..b72d54cd 100644 --- a/openvidu-server/src/main/java/io/openvidu/server/OpenViduServer.java +++ b/openvidu-server/src/main/java/io/openvidu/server/OpenViduServer.java @@ -14,6 +14,7 @@ * limitations under the License. * */ + package io.openvidu.server; import java.io.IOException; @@ -167,7 +168,7 @@ public class OpenViduServer implements JsonRpcConfigurer { } @PostConstruct - public void init() throws MalformedURLException, InterruptedException { + public void init() throws MalformedURLException, InterruptedException { OpenviduConfig openviduConf = openviduConfig(); String publicUrl = openviduConf.getOpenViduPublicUrl(); @@ -200,8 +201,9 @@ public class OpenViduServer implements JsonRpcConfigurer { case "docker": try { - OpenViduServer.publicUrl = "wss://" + getContainerIp() + ":" + openviduConf.getServerPort(); - openviduConf.setFinalUrl("https://" + getContainerIp() + ":" + openviduConf.getServerPort()); + String containerIp = getContainerIp(); + OpenViduServer.publicUrl = "wss://" + containerIp + ":" + openviduConf.getServerPort(); + openviduConf.setFinalUrl("https://" + containerIp + ":" + openviduConf.getServerPort()); } catch (Exception e) { log.error("Docker container IP was configured, but there was an error obtaining IP: " + e.getClass().getName() + " " + e.getMessage()); @@ -298,8 +300,8 @@ public class OpenViduServer implements JsonRpcConfigurer { @EventListener(ApplicationReadyEvent.class) public void printNgrokUrl() { - if (!this.ngrokAppUrl.isEmpty()) { - final String NEW_LINE = System.getProperty("line.separator"); + if (!this.ngrokAppUrl.isEmpty()) { + final String NEW_LINE = System.lineSeparator(); String str = NEW_LINE + NEW_LINE + " APP PUBLIC IP " + NEW_LINE + "-------------------------" + @@ -307,7 +309,7 @@ public class OpenViduServer implements JsonRpcConfigurer { NEW_LINE + "-------------------------" + NEW_LINE; log.info(str); - } + } } } diff --git a/openvidu-server/src/main/java/io/openvidu/server/coturn/BashCoturnCredentialsService.java b/openvidu-server/src/main/java/io/openvidu/server/coturn/BashCoturnCredentialsService.java index ed66c13f..4e38583d 100644 --- a/openvidu-server/src/main/java/io/openvidu/server/coturn/BashCoturnCredentialsService.java +++ b/openvidu-server/src/main/java/io/openvidu/server/coturn/BashCoturnCredentialsService.java @@ -1,3 +1,20 @@ +/* + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + package io.openvidu.server.coturn; import java.io.IOException; diff --git a/openvidu-server/src/main/java/io/openvidu/server/coturn/CoturnCredentialsService.java b/openvidu-server/src/main/java/io/openvidu/server/coturn/CoturnCredentialsService.java index 9eca4a74..84983228 100644 --- a/openvidu-server/src/main/java/io/openvidu/server/coturn/CoturnCredentialsService.java +++ b/openvidu-server/src/main/java/io/openvidu/server/coturn/CoturnCredentialsService.java @@ -1,3 +1,20 @@ +/* + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + package io.openvidu.server.coturn; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/openvidu-server/src/main/java/io/openvidu/server/coturn/CoturnCredentialsServiceFactory.java b/openvidu-server/src/main/java/io/openvidu/server/coturn/CoturnCredentialsServiceFactory.java index 561bb1f1..6ef6927d 100644 --- a/openvidu-server/src/main/java/io/openvidu/server/coturn/CoturnCredentialsServiceFactory.java +++ b/openvidu-server/src/main/java/io/openvidu/server/coturn/CoturnCredentialsServiceFactory.java @@ -1,3 +1,20 @@ +/* + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + package io.openvidu.server.coturn; import io.openvidu.server.config.OpenviduConfig; diff --git a/openvidu-server/src/main/java/io/openvidu/server/coturn/TurnCredentials.java b/openvidu-server/src/main/java/io/openvidu/server/coturn/TurnCredentials.java index 560cf499..037d806f 100644 --- a/openvidu-server/src/main/java/io/openvidu/server/coturn/TurnCredentials.java +++ b/openvidu-server/src/main/java/io/openvidu/server/coturn/TurnCredentials.java @@ -1,3 +1,20 @@ +/* + * (C) Copyright 2017-2018 OpenVidu (https://openvidu.io/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + package io.openvidu.server.coturn; public class TurnCredentials {