<artifactId>aaa-cert</artifactId>
<version>0.9.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId>
+ </dependency>
<!-- Testing Dependencies -->
<dependency>
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.annotation.Nullable;
+import javax.inject.Inject;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLEngineResult.HandshakeStatus;
private static final Map<OvsdbClient, Channel> CONNECTIONS = new ConcurrentHashMap<>();
private volatile boolean useSSL = false;
- private volatile ICertificateManager certManagerSrv;
+ private final ICertificateManager certManagerSrv;
private volatile int jsonRpcDecoderMaxFrameLength = 100000;
private volatile Channel serverChannel;
private volatile String listenerIp = "0.0.0.0";
private volatile int listenerPort = 6640;
+ @Inject
+ public OvsdbConnectionService(ICertificateManager certManagerSrv) {
+ this.certManagerSrv = certManagerSrv;
+ }
+
/**
* If the SSL flag is enabled, the method internally will establish TLS communication using the default
* ODL certificateManager SSLContext and attributes.
useSSL = flag;
}
- /**
- * Set default Certificate manager service.
- *
- * @param certificateManagerSrv reference
- */
- public void setCertificatManager(ICertificateManager certificateManagerSrv) {
- certManagerSrv = certificateManagerSrv;
- }
-
/**
* Blueprint property setter method. Blueprint call this method and set the value of json rpc decoder
* max frame length to the value configured for config option (json-rpc-decoder-max-frame-length) in
<!-- Notify OvsdbConnectionService with any change in the config properties value-->
<bean id="ovsdbConnectionService" class="org.opendaylight.ovsdb.lib.impl.OvsdbConnectionService">
+ <argument ref="aaaCertificateManager"/>
<cm:managed-properties persistent-id="org.opendaylight.ovsdb.library"
update-strategy="component-managed"
update-method="updateConfigParameter"/>
<property name="ovsdbListenerPort" value="${ovsdb-listener-port}"/>
<property name="ovsdbRpcTaskTimeout" value="${ovsdb-rpc-task-timeout}"/>
<property name="useSsl" value="${use-ssl}"/>
- <property name="certificatManager" ref="aaaCertificateManager"/>
<property name="jsonRpcDecoderMaxFrameLength" value="${json-rpc-decoder-max-frame-length}"/>
</bean>