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 extends Event> 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>#if><#rt>
8 | <#lt>#list><#rt>
9 | <#t>#if><#rt>
10 | <#lt><#if (params?? && params?size > 0) >
11 | *
12 | <#lt>#if><#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 | #list>#if>#list><#rt>
18 | <#if return.doc??> * @return ${sphinxLinks(return.doc)}#if><#rt>
19 | *
20 | **/
21 | #macro>
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>#if><#rt>
37 | <#lt><#else> * ${line}
38 | <#lt>#if><#rt>
39 | <#lt>#if><#rt>
40 | <#lt>#list><#rt>
41 | <#t>#if><#rt>
42 | *
43 | **/
44 | #macro>
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 | #if>
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 | #if>
18 | public static String getPackageName () {
19 |
20 | return "${module.code.api.java.packageName}";
21 | }
22 | }
23 | #if>
--------------------------------------------------------------------------------
/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 extends Object> 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