|
1 | 1 | /*
|
2 |
| - * Copyright (c) 2009 - 2018 Deutsches Elektronen-Synchroton, |
| 2 | + * Copyright (c) 2009 - 2019 Deutsches Elektronen-Synchroton, |
3 | 3 | * Member of the Helmholtz Association, (DESY), HAMBURG, GERMANY
|
4 | 4 | *
|
5 | 5 | * This library is free software; you can redistribute it and/or modify
|
|
19 | 19 | */
|
20 | 20 | package org.dcache.oncrpc4j.spring;
|
21 | 21 |
|
| 22 | +import com.google.common.annotations.Beta; |
22 | 23 | import org.springframework.beans.factory.FactoryBean;
|
23 | 24 |
|
24 | 25 | import java.util.Map;
|
25 | 26 | import java.util.concurrent.ExecutorService;
|
| 27 | +import javax.net.ssl.SSLContext; |
| 28 | +import javax.net.ssl.SSLParameters; |
26 | 29 | import org.dcache.oncrpc4j.rpc.OncRpcProgram;
|
27 | 30 | import org.dcache.oncrpc4j.rpc.OncRpcSvcBuilder;
|
28 | 31 | import org.dcache.oncrpc4j.rpc.RpcDispatchable;
|
@@ -129,4 +132,21 @@ public void setSelectorThreadPoolSize(int poolSize) {
|
129 | 132 | public void setWorkerThreadPoolSize(int poolSize) {
|
130 | 133 | builder.withWorkerThreadPoolSize(poolSize);
|
131 | 134 | }
|
| 135 | + |
| 136 | + public void setSslContext(SSLContext sslContext) { |
| 137 | + builder.withSSLContext(sslContext); |
| 138 | + } |
| 139 | + |
| 140 | + public void setSslParameters(SSLParameters sslParameters) { |
| 141 | + builder.withSSLParameters(sslParameters); |
| 142 | + } |
| 143 | + |
| 144 | + @Beta |
| 145 | + public void setEnableStartTLS(boolean enable) { |
| 146 | + if (enable) { |
| 147 | + builder.withStartTLS(); |
| 148 | + } else { |
| 149 | + builder.withoutStartTLS(); |
| 150 | + } |
| 151 | + } |
132 | 152 | }
|
0 commit comments