import java.net.UnknownHostException;
import org.opendaylight.openflowjava.protocol.api.connection.ConnectionConfiguration;
+import org.opendaylight.openflowjava.protocol.api.connection.ThreadConfiguration;
import org.opendaylight.openflowjava.protocol.api.connection.TlsConfiguration;
import org.opendaylight.openflowjava.protocol.impl.connection.SwitchConnectionProviderImpl;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
final Integer port = getPort();
final long switchIdleTimeout = getSwitchIdleTimeout();
final Tls tlsConfig = getTls();
+ final Threads threads = getThreads();
return new ConnectionConfiguration() {
@Override
public org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.config.rev140630.PathType getTlsTruststorePathType() {
return Objects.firstNonNull(tlsConfig.getTruststorePathType(), null);
}
+ @Override
+ public String getKeystorePassword() {
+ return Objects.firstNonNull(tlsConfig.getKeystorePassword(), null);
+ }
+ @Override
+ public String getCertificatePassword() {
+ return Objects.firstNonNull(tlsConfig.getCertificatePassword(), null);
+ }
+ @Override
+ public String getTruststorePassword() {
+ return Objects.firstNonNull(tlsConfig.getTruststorePassword(), null);
+ }
};
}
@Override
// TODO Auto-generated method stub
return null;
}
+ @Override
+ public ThreadConfiguration getThreadConfiguration() {
+ if (threads == null) {
+ return null;
+ }
+ return new ThreadConfiguration() {
+
+ @Override
+ public int getWorkerThreadCount() {
+ return threads.getWorkerThreads();
+ }
+
+ @Override
+ public int getBossThreadCount() {
+ return threads.getBossThreads();
+ }
+ };
+ }
};
}