.sts4-cache
.project
.settings
-.pydevproject
\ No newline at end of file
+.pydevproject
+infer-out/
\ No newline at end of file
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
- limitations under the License.
\ No newline at end of file
+ limitations under the License.
--- /dev/null
+# O-RAN-SC docker-compose files
+
+The docker-compose.yml file will create an entire nonrtric system with one command:
+docker-compose up
+
+Two docker-compose files are provided in this folder:
+
+nosdnc/docker-compose.yml
+This file is to create nonrtric system without sdnc a1-controller
+
+sdnc/docker-compose.yml
+This file is to create nonrtric system with sdnc a1-controller
+
+Howto:
+cd nosdnc/
+docker-compose up
+
+or
+
+cd sdnc/
+docker-compose up
+
+The scripts in data/ will generate some dummy data in the running system.
+It will create:
+one policy type in a1-sim-OSC
+one service in policy agent
+one policy in a1-sim-OSC
+one policy in a1-sim-STD
+
+Run command:
+cd data/
+./fill_data.sh [policy-agent-port] [a1-sim-OSC-port] [a1-sim-STD-port] [http/https]
+
+Open link:
+http://localhost:[control-panel-port]/
+
+All the generated data is shown on the web page
+
+## License
+
+Copyright (C) 2020 Nordix Foundation.
+Licensed under the Apache License, Version 2.0 (the "License")
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+For more information about license please see the [LICENSE](LICENSE.txt) file for details.
--- /dev/null
+#!/bin/bash
+
+# ============LICENSE_START===============================================
+# Copyright (C) 2020 Nordix Foundation. All rights reserved.
+# ========================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=================================================
+#
+
+# The scripts in data/ will generate some dummy data in the running system.
+# It will create:
+# one policy type in a1-sim-OSC
+# one service in policy agent
+# one policy in a1-sim-OSC
+# one policy in a1-sim-STD
+
+# Run command:
+# ./fill_data.sh [policy-agent port] [a1-sim-OSC port] [a1-sim-STD port] [http/https]
+
+policy_agent_port=${1:-8081}
+a1_sim_OSC_port=${2:-30001}
+a1_sim_STD_port=${3:-30003}
+httpx=${4:-"http"}
+
+echo "using policy_agent port: "$policy_agent_port
+echo "using a1-sim-OSC port: "$a1_sim_OSC_port
+echo "using a1-sim-STD port: "$a1_sim_STD_port
+echo "using protocol: "$httpx
+echo -e "\n"
+
+echo "policy agent status:"
+curl -skw " %{http_code}" $httpx://localhost:$policy_agent_port/status
+echo -e "\n"
+
+echo "ric1 version:"
+curl -skw " %{http_code}" $httpx://localhost:$a1_sim_OSC_port/counter/interface
+echo -e "\n"
+
+echo "ric2 version:"
+curl -skw " %{http_code}" $httpx://localhost:$a1_sim_STD_port/counter/interface
+echo -e "\n"
+
+echo "create policy type 1 to ric1:"
+curl -X PUT -skw " %{http_code}" $httpx://localhost:$a1_sim_OSC_port/policytype?id=1 -H Content-Type:application/json --data-binary @testdata/OSC/policy_type.json
+echo -e "\n"
+
+for i in {1..12}; do
+ echo "policy types from policy agent:"
+ curlString="curl -skw %{http_code} $httpx://localhost:$policy_agent_port/policy_types"
+ res=$($curlString)
+ echo "$res"
+ expect="[\"\",\"1\"]200"
+ if [ "$res" == "$expect" ]; then
+ echo -e "\n"
+ break;
+ else
+ sleep $i
+ fi
+done
+
+echo "create service 1 to policy agent:"
+curl -k -X PUT -sw " %{http_code}" -H accept:application/json -H Content-Type:application/json "$httpx://localhost:$policy_agent_port/service" --data-binary @testdata/service.json
+echo -e "\n"
+
+echo "create policy 2000 to ric1 with type1 and service1 via policy agent:"
+curl -k -X PUT -sw " %{http_code}" -H accept:application/json -H Content-Type:application/json "$httpx://localhost:$policy_agent_port/policy?id=2000&ric=ric1&service=service1&type=1" --data-binary @testdata/policy.json
+echo -e "\n"
+
+echo "policy numbers from ric1:"
+curl -skw " %{http_code}" $httpx://localhost:$a1_sim_OSC_port/counter/num_instances
+echo -e "\n"
+
+echo "create policy 2100 to ric2 with service1 via policy agent, no type:"
+curl -k -X PUT -sw " %{http_code}" -H accept:application/json -H Content-Type:application/json "$httpx://localhost:$policy_agent_port/policy?id=2100&ric=ric2&service=service1" --data-binary @testdata/policy.json
+echo -e "\n"
+
+echo "policy numbers from ric2:"
+curl -skw " %{http_code}" $httpx://localhost:$a1_sim_STD_port/counter/num_instances
+echo -e "\n"
+
+echo "policy id 2000 from policy agent:"
+curl -k -X GET -sw " %{http_code}" $httpx://localhost:$policy_agent_port/policy?id=2000
+echo -e "\n"
+
+echo "policy id 2100 from policy agent:"
+curl -k -X GET -sw " %{http_code}" $httpx://localhost:$policy_agent_port/policy?id=2100
+echo -e "\n"
\ No newline at end of file
--- /dev/null
+{
+ "name": "pt1",
+ "description": "pt1 policy type",
+ "policy_type_id": 1,
+ "create_schema": {
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "OSC_Type1_1.0.0",
+ "description": "Type 1 policy type",
+ "type": "object",
+ "properties": {
+ "scope": {
+ "type": "object",
+ "properties": {
+ "ueId": {
+ "type": "string"
+ },
+ "qosId": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "ueId",
+ "qosId"
+ ]
+ },
+ "qosObjective": {
+ "type": "object",
+ "properties": {
+ "priorityLevel": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "priorityLevel"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "scope", "qosObjective"
+ ]
+ }
+}
--- /dev/null
+{
+ "scope": {
+ "ueId": "ue3100",
+ "qosId": "qos3100"
+ },
+ "qosObjective": {
+ "priorityLevel": 3100
+ }
+}
--- /dev/null
+{"callbackUrl": "http://callback-receiver:8090/callbacks/1","keepAliveIntervalSeconds": "3600","serviceName": "service1"}
--- /dev/null
+spring:
+ profiles:
+ active: prod
+ main:
+ allow-bean-definition-overriding: true
+ aop:
+ auto: false
+management:
+ endpoints:
+ web:
+ exposure:
+ include: "loggers,logfile,health,info,metrics,threaddump,heapdump"
+
+logging:
+ level:
+ ROOT: ERROR
+ org.springframework: ERROR
+ org.springframework.data: ERROR
+ org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR
+ org.oransc.policyagent: INFO
+ file: /var/log/policy-agent/application.log
+server:
+ port : 8433
+ http-port: 8081
+ ssl:
+ key-store-type: JKS
+ key-store-password: policy_agent
+ key-store: classpath:keystore.jks
+ key-password: policy_agent
+ key-alias: policy_agent
+app:
+ filepath: /opt/app/policy-agent/config/application_configuration.json
+ webclient:
+ trust-store-used: false
+ trust-store-password: policy_agent
+ trust-store: classpath:keystore.jks
+
--- /dev/null
+{
+ "config": {
+ "//description": "Application configuration",
+ "ric": [
+ {
+ "name": "ric1",
+ "baseUrl": "http://a1-sim-OSC:8085/",
+ "managedElementIds": [
+ "kista_1",
+ "kista_2"
+ ]
+ },
+ {
+ "name":"ric2",
+ "baseUrl":"http://a1-sim-STD:8085/",
+ "managedElementIds": [
+ "kista_1",
+ "kista_2"
+ ]
+ }
+ ]
+ }
+}
\ No newline at end of file
--- /dev/null
+# Copyright (C) 2020 Nordix Foundation. All rights reserved.
+# ========================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=================================================
+#
+version: '3.0'
+services:
+ policy-agent:
+ image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-policy-agent:1.0.0
+ container_name: policy-agent
+ networks:
+ default:
+ aliases:
+ - policy-agent-container
+ ports:
+ - 8081:8081
+ - 8433:8433
+ volumes:
+ - ./config:/opt/app/policy-agent/config:ro
+
+ a1-sim-OSC:
+ image: nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:1.0.1
+ container_name: a1-sim-OSC
+ networks:
+ - default
+ ports:
+ - 30001:8085
+ - 30002:8185
+ environment:
+ - A1_VERSION=OSC_2.1.0
+ - REMOTE_HOSTS_LOGGING=1
+ - ALLOW_HTTP=true
+
+ a1-sim-STD:
+ image: nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:1.0.1
+ container_name: a1-sim-STD
+ networks:
+ - default
+ ports:
+ - 30003:8085
+ - 30004:8185
+ environment:
+ - A1_VERSION=STD_1.1.3
+ - REMOTE_HOSTS_LOGGING=1
+ - ALLOW_HTTP=true
+
+ policy-control-panel:
+ image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-controlpanel:1.0.0
+ container_name: policy-control-panel
+ networks:
+ - default
+ ports:
+ - 8080:8080
+ - 8082:8082
--- /dev/null
+spring:
+ profiles:
+ active: prod
+ main:
+ allow-bean-definition-overriding: true
+ aop:
+ auto: false
+management:
+ endpoints:
+ web:
+ exposure:
+ include: "loggers,logfile,health,info,metrics,threaddump,heapdump"
+
+logging:
+ level:
+ ROOT: ERROR
+ org.springframework: ERROR
+ org.springframework.data: ERROR
+ org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR
+ org.oransc.policyagent: INFO
+ file: /var/log/policy-agent/application.log
+server:
+ port : 8433
+ http-port: 8081
+ ssl:
+ key-store-type: JKS
+ key-store-password: policy_agent
+ key-store: classpath:keystore.jks
+ key-password: policy_agent
+ key-alias: policy_agent
+app:
+ filepath: /opt/app/policy-agent/config/application_configuration.json
+ webclient:
+ trust-store-used: false
+ trust-store-password: policy_agent
+ trust-store: classpath:keystore.jks
+
--- /dev/null
+{
+ "config": {
+ "//description": "Application configuration",
+ "controller": [
+ {
+ "name": "a1-controller",
+ "baseUrl": "http://a1-controller:8181",
+ "userName": "admin",
+ "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
+ }
+ ],
+ "ric": [
+ {
+ "name": "ric1",
+ "baseUrl": "http://a1-sim-OSC:8085/",
+ "controller": "a1-controller",
+ "managedElementIds": [
+ "kista_1",
+ "kista_2"
+ ]
+ },
+ {
+ "name":"ric2",
+ "baseUrl":"http://a1-sim-STD:8085/",
+ "controller": "a1-controller",
+ "managedElementIds":[
+ "kista_1",
+ "kista_2"
+ ]
+ }
+ ]
+ }
+}
\ No newline at end of file
--- /dev/null
+# Copyright (C) 2020 Nordix Foundation. All rights reserved.
+# ========================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=================================================
+#
+version: '3.0'
+services:
+ policy-agent:
+ image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-policy-agent:1.0.0
+ container_name: policy-agent
+ networks:
+ default:
+ aliases:
+ - policy-agent-container
+ ports:
+ - 8081:8081
+ - 8433:8433
+ volumes:
+ - ./config:/opt/app/policy-agent/config:ro
+
+ a1-sim-OSC:
+ image: nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:1.0.1
+ container_name: a1-sim-OSC
+ networks:
+ - default
+ ports:
+ - 30001:8085
+ - 30002:8185
+ environment:
+ - A1_VERSION=OSC_2.1.0
+ - REMOTE_HOSTS_LOGGING=1
+ - ALLOW_HTTP=true
+
+ a1-sim-STD:
+ image: nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:1.0.1
+ container_name: a1-sim-STD
+ networks:
+ - default
+ ports:
+ - 30003:8085
+ - 30004:8185
+ environment:
+ - A1_VERSION=STD_1.1.3
+ - REMOTE_HOSTS_LOGGING=1
+ - ALLOW_HTTP=true
+
+ policy-control-panel:
+ image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-controlpanel:1.0.0
+ container_name: policy-control-panel
+ networks:
+ - default
+ ports:
+ - 8080:8080
+ - 8082:8082
+
+ db:
+ image: mysql/mysql-server:5.6
+ container_name: sdnc-db
+ networks:
+ - default
+ ports:
+ - "3306"
+ environment:
+ - MYSQL_ROOT_PASSWORD=openECOMP1.0
+ - MYSQL_ROOT_HOST=%
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "30m"
+ max-file: "5"
+
+ a1-controller:
+ image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-a1-controller:1.7.5
+ depends_on :
+ - db
+ container_name: a1-controller
+ networks:
+ - default
+ entrypoint: ["/opt/onap/sdnc/bin/startODL.sh"]
+ ports:
+ - 8282:8181
+ - 8443:8443
+ links:
+ - db:dbhost
+ - db:sdnctldb01
+ - db:sdnctldb02
+ environment:
+ - MYSQL_ROOT_PASSWORD=openECOMP1.0
+ - SDNC_CONFIG_DIR=/opt/onap/sdnc/data/properties
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "30m"
+ max-file: "5"
EXPOSE 8081 8433
-ADD /config/* /opt/app/policy-agent/config/
+ADD /config/application.yaml /opt/app/policy-agent/config/application.yaml
+ADD /config/application_configuration.json /opt/app/policy-agent/data/application_configuration.json_example
ADD target/${JAR} /opt/app/policy-agent/policy-agent.jar
key-password: policy_agent
key-alias: policy_agent
app:
- filepath: /opt/app/policy-agent/config/application_configuration.json
+ filepath: /opt/app/policy-agent/data/application_configuration.json
webclient:
trust-store-used: false
trust-store-password: policy_agent
logger.debug("{} HTTP error status = '{}', body '{}'", traceTag, exception.getStatusCode(),
exception.getResponseBodyAsString());
} else {
- logger.debug("{} HTTP error: {}", traceTag, t.getMessage());
+ logger.debug("{} HTTP error", traceTag, t);
}
}
RejectionException e = new RejectionException("Policy cannot change RIC, policyId: " + current.id() + //
", RIC name: " + current.ric().name() + //
", new name: " + policy.ric().name(), HttpStatus.CONFLICT);
+ logger.debug("Request rejected, {}", e);
return Mono.error(e);
}
return Mono.just("OK");
private Mono<Object> checkSupportedType(Ric ric, PolicyType type) {
if (!ric.isSupportingType(type.name())) {
+ logger.debug("Request rejected, type not supported, RIC: {}", ric);
RejectionException e = new RejectionException(
"Type: " + type.name() + " not supported by RIC: " + ric.name(), HttpStatus.NOT_FOUND);
return Mono.error(e);
if (ric.getState() == Ric.RicState.AVAILABLE) {
return Mono.just("OK");
} else {
+ logger.debug("Request rejected RIC not IDLE, ric: {}", ric);
RejectionException e = new RejectionException(
"Ric is not operational, RIC name: " + ric.name() + ", state: " + ric.getState(), HttpStatus.LOCKED);
return Mono.error(e);
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
+import org.springframework.web.reactive.function.client.WebClientException;
import org.springframework.web.reactive.function.client.WebClientResponseException;
import reactor.core.publisher.Mono;
private Mono<ResponseEntity<String>> handleAgentCallError(Throwable t, String originalMessage,
DmaapRequestMessage dmaapRequestMessage) {
logger.debug("Agent call failed: {}", t.getMessage());
- HttpStatus status = HttpStatus.NOT_FOUND;
+ HttpStatus status = HttpStatus.INTERNAL_SERVER_ERROR;
String errorMessage = t.getMessage();
if (t instanceof WebClientResponseException) {
WebClientResponseException exception = (WebClientResponseException) t;
} else if (t instanceof ServiceException) {
status = HttpStatus.BAD_REQUEST;
errorMessage = prepareBadOperationErrorMessage(t, originalMessage);
-
+ } else if (!(t instanceof WebClientException)) {
+ logger.warn("Unexpected exception ", t);
}
return sendDmaapResponse(errorMessage, dmaapRequestMessage, status) //
.flatMap(notUsed -> Mono.empty());
} else {
return Mono.error(new ServiceException("Not implemented operation: " + operation));
}
-
}
private String payload(DmaapRequestMessage message) {
private final List<LockRequest> lockRequestQueue = new LinkedList<>();
private static AsynchCallbackExecutor callbackProcessor = new AsynchCallbackExecutor();
- private static class AsynchCallbackExecutor implements Runnable {
- private List<LockRequest> lockRequestQueue = new LinkedList<>();
-
- public AsynchCallbackExecutor() {
- Thread thread = new Thread(this);
- thread.start();
- }
-
- public synchronized void addAll(List<LockRequest> requests) {
- this.lockRequestQueue.addAll(requests);
- this.notifyAll();
- }
-
- @Override
- public void run() {
- try {
- while (true) {
- for (LockRequest request : consume()) {
- request.callback.success(request.lock);
- }
- waitForNewEntries();
- }
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- logger.error("Interrupted {}", e.getMessage());
- }
- }
-
- private synchronized List<LockRequest> consume() {
- List<LockRequest> q = this.lockRequestQueue;
- this.lockRequestQueue = new LinkedList<>();
- return q;
- }
-
- @SuppressWarnings("java:S2274")
- private synchronized void waitForNewEntries() throws InterruptedException {
- if (this.lockRequestQueue.isEmpty()) {
- this.wait();
- }
- }
- }
-
public enum LockType {
EXCLUSIVE, SHARED
}
});
}
- public void unlockBlocking() {
- synchronized (this) {
- if (lockCounter <= 0) {
- lockCounter = -1; // Might as well stop, to make it easier to find the problem
- logger.error("Number of unlocks must match the number of locks");
- }
- this.lockCounter--;
- if (lockCounter == 0) {
- isExclusive = false;
- }
- this.notifyAll();
+ public synchronized void unlockBlocking() {
+ if (lockCounter <= 0) {
+ lockCounter = -1; // Might as well stop, to make it easier to find the problem
+ logger.error("Number of unlocks must match the number of locks");
+ }
+ this.lockCounter--;
+ if (lockCounter == 0) {
+ isExclusive = false;
}
+ this.notifyAll();
this.processQueuedEntries();
}
@Override
- public String toString() {
+ public synchronized String toString() {
return "Lock cnt: " + this.lockCounter + " exclusive: " + this.isExclusive + " queued: "
+ this.lockRequestQueue.size();
}
private void processQueuedEntries() {
List<LockRequest> granted = new ArrayList<>();
- synchronized (this) {
- for (Iterator<LockRequest> i = lockRequestQueue.iterator(); i.hasNext();) {
- LockRequest request = i.next();
- if (tryLock(request.lockType)) {
- i.remove();
- granted.add(request);
- }
+ for (Iterator<LockRequest> i = lockRequestQueue.iterator(); i.hasNext();) {
+ LockRequest request = i.next();
+ if (tryLock(request.lockType)) {
+ i.remove();
+ granted.add(request);
}
}
callbackProcessor.addAll(granted);
}
- private static class LockRequest {
- final MonoSink<Lock> callback;
- final LockType lockType;
- final Lock lock;
-
- LockRequest(MonoSink<Lock> callback, LockType lockType, Lock lock) {
- this.callback = callback;
- this.lockType = lockType;
- this.lock = lock;
- }
- }
-
private synchronized void addToQueue(MonoSink<Lock> callback, LockType lockType) {
lockRequestQueue.add(new LockRequest(callback, lockType, this));
+ processQueuedEntries();
}
@SuppressWarnings("java:S2274") // Always invoke wait() and await() methods inside a loop
return true;
}
+ /**
+ * Represents a queued lock request
+ */
+ private static class LockRequest {
+ final MonoSink<Lock> callback;
+ final LockType lockType;
+ final Lock lock;
+
+ LockRequest(MonoSink<Lock> callback, LockType lockType, Lock lock) {
+ this.callback = callback;
+ this.lockType = lockType;
+ this.lock = lock;
+ }
+ }
+
+ /**
+ * A separate thread that calls a MonoSink to continue. This is done after a
+ * queued lock is granted.
+ */
+ private static class AsynchCallbackExecutor implements Runnable {
+ private List<LockRequest> lockRequestQueue = new LinkedList<>();
+
+ public AsynchCallbackExecutor() {
+ Thread thread = new Thread(this);
+ thread.start();
+ }
+
+ public synchronized void addAll(List<LockRequest> requests) {
+ this.lockRequestQueue.addAll(requests);
+ this.notifyAll();
+ }
+
+ @Override
+ public void run() {
+ try {
+ while (true) {
+ for (LockRequest request : consume()) {
+ request.callback.success(request.lock);
+ }
+ waitForNewEntries();
+ }
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ logger.error("Interrupted {}", e.getMessage());
+ }
+ }
+
+ private synchronized List<LockRequest> consume() {
+ List<LockRequest> q = this.lockRequestQueue;
+ this.lockRequestQueue = new LinkedList<>();
+ return q;
+ }
+
+ @SuppressWarnings("java:S2274")
+ private synchronized void waitForNewEntries() throws InterruptedException {
+ if (this.lockRequestQueue.isEmpty()) {
+ this.wait();
+ }
+ }
+ }
}
import org.apache.http.client.HttpClient;
import org.apache.http.conn.ssl.NoopHostnameVerifier;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
-import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
+import org.apache.http.conn.ssl.TrustAllStrategy;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.ssl.SSLContexts;
import org.slf4j.Logger;
SSLContexts.custom()
.loadKeyMaterial(ResourceUtils.getFile(properties.getProperty("key-store")),
keystorePassword.toCharArray(), keystorePassword.toCharArray())
- .loadTrustMaterial(null, new TrustSelfSignedStrategy())
+ .loadTrustMaterial(null, new TrustAllStrategy())
.build(),
NoopHostnameVerifier.INSTANCE);
HttpClient client = HttpClients.custom().setSSLSocketFactory(scsf).build();