Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
package org.apache.kafka.common.security.ssl;

import javax.net.ssl.SSLContext;
import java.util.Map;
import java.util.Set;

public interface SslContextFactory {

    /**
     * Returns SSLContext loaded by this factory.
     *
     * @return 
     */
    SSLContext getSSLContextcreateSSLContext();

    /**
     * Returns the currently used configurations by this object.
     * @return
     */
    Map<String, Object> configs();

    /**
     * Returns the reconfigurable configs used by this object.
     * @return
     */
    Set<String> reconfigurableConfigs();

    /**
     * Returns true if the SSLContext needs to be rebuilt.
     *
     * @param nextConfigs       The configuration we want to use.
     * @return                  True only if the SSLContext should be rebuilt.
     */
    boolean shouldRebuiltFor(Map<String, Object> nextConfigs);
}

...

Code Block
public class SslFactory implement Reconfigurable {
...
...
     sslContextFactoryClass.getDeclaredConstructor(Map.class).newInstance(configs);
...
}


Sequence Diagrams for important interactions

SslFactory and SslContextFactory Interaction

Image Added


Support for reconfiguration of custom configs

...