View Javadoc
1   /**
2    * Logback: the reliable, generic, fast and flexible logging framework.
3    * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
4    *
5    * This program and the accompanying materials are dual-licensed under
6    * either the terms of the Eclipse Public License v1.0 as published by
7    * the Eclipse Foundation
8    *
9    *   or (per the licensee's choosing)
10   *
11   * under the terms of the GNU Lesser General Public License version 2.1
12   * as published by the Free Software Foundation.
13   */
14  package ch.qos.logback.core.net.ssl;
15  
16  import javax.net.ssl.SSLServerSocket;
17  
18  /**
19   * An {@link SSLConfigurable} wrapper for an {@link SSLServerSocket}.
20   *
21   * @author Carl Harris
22   */
23  public class SSLConfigurableServerSocket implements SSLConfigurable {
24  
25      private final SSLServerSocket delegate;
26  
27      public SSLConfigurableServerSocket(SSLServerSocket delegate) {
28          this.delegate = delegate;
29      }
30  
31      public String[] getDefaultProtocols() {
32          return delegate.getEnabledProtocols();
33      }
34  
35      public String[] getSupportedProtocols() {
36          return delegate.getSupportedProtocols();
37      }
38  
39      public void setEnabledProtocols(String[] protocols) {
40          delegate.setEnabledProtocols(protocols);
41      }
42  
43      public String[] getDefaultCipherSuites() {
44          return delegate.getEnabledCipherSuites();
45      }
46  
47      public String[] getSupportedCipherSuites() {
48          return delegate.getSupportedCipherSuites();
49      }
50  
51      public void setEnabledCipherSuites(String[] suites) {
52          delegate.setEnabledCipherSuites(suites);
53      }
54  
55      public void setNeedClientAuth(boolean state) {
56          delegate.setNeedClientAuth(state);
57      }
58  
59      public void setWantClientAuth(boolean state) {
60          delegate.setWantClientAuth(state);
61      }
62  
63  }