test_class.declarator: builder
test_class.modifier: private
test_class.original_string: private LeshanBootstrapServerBuilder builder;
test_class.type: LeshanBootstrapServerBuilder
test_class.var_name: builder
test_class.declarator: server
test_class.modifier: private
test_class.original_string: private LeshanBootstrapServer server;
test_class.type: LeshanBootstrapServer
test_class.var_name: server
test_class.file: leshan-server-cf/src/test/java/org/eclipse/leshan/server/californium/bootstrap/LeshanBootstrapServerBuilderTest.java
test_class.identifier: LeshanBootstrapServerBuilderTest
test_case.body: @Test
      public void create_server_minimal_parameters() {
          server = builder.build();
  
          assertNull(server.getSecuredAddress());
          assertNotNull(server.getUnsecuredAddress());
      }
test_case.class_method_signature: LeshanBootstrapServerBuilderTest.create_server_minimal_parameters()
test_case.full_signature: @Test public void create_server_minimal_parameters()
test_case.identifier: create_server_minimal_parameters
test_case.invocations: build assertNull getSecuredAddress assertNotNull getUnsecuredAddress
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void create_server_minimal_parameters()
focal_class.declarator: LOG = LoggerFactory.getLogger(LeshanBootstrapServerBuilder.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(LeshanBootstrapServerBuilder.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: localAddress
focal_class.modifier: private
focal_class.original_string: private InetSocketAddress localAddress;
focal_class.type: InetSocketAddress
focal_class.var_name: localAddress
focal_class.declarator: localAddressSecure
focal_class.modifier: private
focal_class.original_string: private InetSocketAddress localAddressSecure;
focal_class.type: InetSocketAddress
focal_class.var_name: localAddressSecure
focal_class.declarator: configStore
focal_class.modifier: private
focal_class.original_string: private BootstrapConfigStore configStore;
focal_class.type: BootstrapConfigStore
focal_class.var_name: configStore
focal_class.declarator: securityStore
focal_class.modifier: private
focal_class.original_string: private BootstrapSecurityStore securityStore;
focal_class.type: BootstrapSecurityStore
focal_class.var_name: securityStore
focal_class.declarator: sessionManager
focal_class.modifier: private
focal_class.original_string: private BootstrapSessionManager sessionManager;
focal_class.type: BootstrapSessionManager
focal_class.var_name: sessionManager
focal_class.declarator: bootstrapHandlerFactory
focal_class.modifier: private
focal_class.original_string: private BootstrapHandlerFactory bootstrapHandlerFactory;
focal_class.type: BootstrapHandlerFactory
focal_class.var_name: bootstrapHandlerFactory
focal_class.declarator: model
focal_class.modifier: private
focal_class.original_string: private LwM2mModel model;
focal_class.type: LwM2mModel
focal_class.var_name: model
focal_class.declarator: coapConfig
focal_class.modifier: private
focal_class.original_string: private NetworkConfig coapConfig;
focal_class.type: NetworkConfig
focal_class.var_name: coapConfig
focal_class.declarator: dtlsConfigBuilder
focal_class.modifier: private
focal_class.original_string: private Builder dtlsConfigBuilder;
focal_class.type: Builder
focal_class.var_name: dtlsConfigBuilder
focal_class.declarator: encoder
focal_class.modifier: private
focal_class.original_string: private LwM2mNodeEncoder encoder;
focal_class.type: LwM2mNodeEncoder
focal_class.var_name: encoder
focal_class.declarator: decoder
focal_class.modifier: private
focal_class.original_string: private LwM2mNodeDecoder decoder;
focal_class.type: LwM2mNodeDecoder
focal_class.var_name: decoder
focal_class.declarator: publicKey
focal_class.modifier: private
focal_class.original_string: private PublicKey publicKey;
focal_class.type: PublicKey
focal_class.var_name: publicKey
focal_class.declarator: privateKey
focal_class.modifier: private
focal_class.original_string: private PrivateKey privateKey;
focal_class.type: PrivateKey
focal_class.var_name: privateKey
focal_class.declarator: certificateChain
focal_class.modifier: private
focal_class.original_string: private X509Certificate[] certificateChain;
focal_class.type: X509Certificate[]
focal_class.var_name: certificateChain
focal_class.declarator: trustedCertificates
focal_class.modifier: private
focal_class.original_string: private Certificate[] trustedCertificates;
focal_class.type: Certificate[]
focal_class.var_name: trustedCertificates
focal_class.declarator: endpointFactory
focal_class.modifier: private
focal_class.original_string: private EndpointFactory endpointFactory;
focal_class.type: EndpointFactory
focal_class.var_name: endpointFactory
focal_class.declarator: noSecuredEndpoint
focal_class.modifier: private
focal_class.original_string: private boolean noSecuredEndpoint;
focal_class.type: boolean
focal_class.var_name: noSecuredEndpoint
focal_class.declarator: noUnsecuredEndpoint
focal_class.modifier: private
focal_class.original_string: private boolean noUnsecuredEndpoint;
focal_class.type: boolean
focal_class.var_name: noUnsecuredEndpoint
focal_class.file: leshan-server-cf/src/main/java/org/eclipse/leshan/server/californium/bootstrap/LeshanBootstrapServerBuilder.java
focal_class.identifier: LeshanBootstrapServerBuilder
focal_class.class_method_signature: LeshanBootstrapServerBuilder.setLocalAddress(String hostname, int port)
focal_class.full_signature: public LeshanBootstrapServerBuilder setLocalAddress(String hostname, int port)
focal_class.identifier: setLocalAddress
focal_class.modifiers: public
focal_class.parameters: (String hostname, int port)
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder setLocalAddress(String hostname, int port)
focal_class.class_method_signature: LeshanBootstrapServerBuilder.setLocalAddress(InetSocketAddress localAddress)
focal_class.full_signature: public LeshanBootstrapServerBuilder setLocalAddress(InetSocketAddress localAddress)
focal_class.identifier: setLocalAddress
focal_class.modifiers: public
focal_class.parameters: (InetSocketAddress localAddress)
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder setLocalAddress(InetSocketAddress localAddress)
focal_class.class_method_signature: LeshanBootstrapServerBuilder.setLocalSecureAddress(String hostname, int port)
focal_class.full_signature: public LeshanBootstrapServerBuilder setLocalSecureAddress(String hostname, int port)
focal_class.identifier: setLocalSecureAddress
focal_class.modifiers: public
focal_class.parameters: (String hostname, int port)
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder setLocalSecureAddress(String hostname, int port)
focal_class.class_method_signature: LeshanBootstrapServerBuilder.setLocalSecureAddress(InetSocketAddress localSecureAddress)
focal_class.full_signature: public LeshanBootstrapServerBuilder setLocalSecureAddress(InetSocketAddress localSecureAddress)
focal_class.identifier: setLocalSecureAddress
focal_class.modifiers: public
focal_class.parameters: (InetSocketAddress localSecureAddress)
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder setLocalSecureAddress(InetSocketAddress localSecureAddress)
focal_class.class_method_signature: LeshanBootstrapServerBuilder.setPublicKey(PublicKey publicKey)
focal_class.full_signature: public LeshanBootstrapServerBuilder setPublicKey(PublicKey publicKey)
focal_class.identifier: setPublicKey
focal_class.modifiers: public
focal_class.parameters: (PublicKey publicKey)
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder setPublicKey(PublicKey publicKey)
focal_class.class_method_signature: LeshanBootstrapServerBuilder.setCertificateChain(T[] certificateChain)
focal_class.full_signature: public LeshanBootstrapServerBuilder setCertificateChain(T[] certificateChain)
focal_class.identifier: setCertificateChain
focal_class.modifiers: public
focal_class.parameters: (T[] certificateChain)
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder setCertificateChain(T[] certificateChain)
focal_class.class_method_signature: LeshanBootstrapServerBuilder.setPrivateKey(PrivateKey privateKey)
focal_class.full_signature: public LeshanBootstrapServerBuilder setPrivateKey(PrivateKey privateKey)
focal_class.identifier: setPrivateKey
focal_class.modifiers: public
focal_class.parameters: (PrivateKey privateKey)
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder setPrivateKey(PrivateKey privateKey)
focal_class.class_method_signature: LeshanBootstrapServerBuilder.setTrustedCertificates(T[] trustedCertificates)
focal_class.full_signature: public LeshanBootstrapServerBuilder setTrustedCertificates(T[] trustedCertificates)
focal_class.identifier: setTrustedCertificates
focal_class.modifiers: public
focal_class.parameters: (T[] trustedCertificates)
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder setTrustedCertificates(T[] trustedCertificates)
focal_class.class_method_signature: LeshanBootstrapServerBuilder.setConfigStore(BootstrapConfigStore configStore)
focal_class.full_signature: public LeshanBootstrapServerBuilder setConfigStore(BootstrapConfigStore configStore)
focal_class.identifier: setConfigStore
focal_class.modifiers: public
focal_class.parameters: (BootstrapConfigStore configStore)
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder setConfigStore(BootstrapConfigStore configStore)
focal_class.class_method_signature: LeshanBootstrapServerBuilder.setSecurityStore(BootstrapSecurityStore securityStore)
focal_class.full_signature: public LeshanBootstrapServerBuilder setSecurityStore(BootstrapSecurityStore securityStore)
focal_class.identifier: setSecurityStore
focal_class.modifiers: public
focal_class.parameters: (BootstrapSecurityStore securityStore)
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder setSecurityStore(BootstrapSecurityStore securityStore)
focal_class.class_method_signature: LeshanBootstrapServerBuilder.setSessionManager(BootstrapSessionManager sessionManager)
focal_class.full_signature: public LeshanBootstrapServerBuilder setSessionManager(BootstrapSessionManager sessionManager)
focal_class.identifier: setSessionManager
focal_class.modifiers: public
focal_class.parameters: (BootstrapSessionManager sessionManager)
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder setSessionManager(BootstrapSessionManager sessionManager)
focal_class.class_method_signature: LeshanBootstrapServerBuilder.setBootstrapHandlerFactory(BootstrapHandlerFactory bootstrapHandlerFactory)
focal_class.full_signature: public LeshanBootstrapServerBuilder setBootstrapHandlerFactory(BootstrapHandlerFactory bootstrapHandlerFactory)
focal_class.identifier: setBootstrapHandlerFactory
focal_class.modifiers: public
focal_class.parameters: (BootstrapHandlerFactory bootstrapHandlerFactory)
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder setBootstrapHandlerFactory(BootstrapHandlerFactory bootstrapHandlerFactory)
focal_class.class_method_signature: LeshanBootstrapServerBuilder.setModel(LwM2mModel model)
focal_class.full_signature: public LeshanBootstrapServerBuilder setModel(LwM2mModel model)
focal_class.identifier: setModel
focal_class.modifiers: public
focal_class.parameters: (LwM2mModel model)
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder setModel(LwM2mModel model)
focal_class.class_method_signature: LeshanBootstrapServerBuilder.setEncoder(LwM2mNodeEncoder encoder)
focal_class.full_signature: public LeshanBootstrapServerBuilder setEncoder(LwM2mNodeEncoder encoder)
focal_class.identifier: setEncoder
focal_class.modifiers: public
focal_class.parameters: (LwM2mNodeEncoder encoder)
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder setEncoder(LwM2mNodeEncoder encoder)
focal_class.class_method_signature: LeshanBootstrapServerBuilder.setDecoder(LwM2mNodeDecoder decoder)
focal_class.full_signature: public LeshanBootstrapServerBuilder setDecoder(LwM2mNodeDecoder decoder)
focal_class.identifier: setDecoder
focal_class.modifiers: public
focal_class.parameters: (LwM2mNodeDecoder decoder)
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder setDecoder(LwM2mNodeDecoder decoder)
focal_class.class_method_signature: LeshanBootstrapServerBuilder.setCoapConfig(NetworkConfig coapConfig)
focal_class.full_signature: public LeshanBootstrapServerBuilder setCoapConfig(NetworkConfig coapConfig)
focal_class.identifier: setCoapConfig
focal_class.modifiers: public
focal_class.parameters: (NetworkConfig coapConfig)
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder setCoapConfig(NetworkConfig coapConfig)
focal_class.class_method_signature: LeshanBootstrapServerBuilder.setDtlsConfig(Builder dtlsConfig)
focal_class.full_signature: public LeshanBootstrapServerBuilder setDtlsConfig(Builder dtlsConfig)
focal_class.identifier: setDtlsConfig
focal_class.modifiers: public
focal_class.parameters: (Builder dtlsConfig)
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder setDtlsConfig(Builder dtlsConfig)
focal_class.class_method_signature: LeshanBootstrapServerBuilder.setEndpointFactory(EndpointFactory endpointFactory)
focal_class.full_signature: public LeshanBootstrapServerBuilder setEndpointFactory(EndpointFactory endpointFactory)
focal_class.identifier: setEndpointFactory
focal_class.modifiers: public
focal_class.parameters: (EndpointFactory endpointFactory)
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder setEndpointFactory(EndpointFactory endpointFactory)
focal_class.class_method_signature: LeshanBootstrapServerBuilder.disableUnsecuredEndpoint()
focal_class.full_signature: public LeshanBootstrapServerBuilder disableUnsecuredEndpoint()
focal_class.identifier: disableUnsecuredEndpoint
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder disableUnsecuredEndpoint()
focal_class.class_method_signature: LeshanBootstrapServerBuilder.disableSecuredEndpoint()
focal_class.full_signature: public LeshanBootstrapServerBuilder disableSecuredEndpoint()
focal_class.identifier: disableSecuredEndpoint
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: LeshanBootstrapServerBuilder
focal_class.signature: LeshanBootstrapServerBuilder disableSecuredEndpoint()
focal_class.class_method_signature: LeshanBootstrapServerBuilder.createDefaultNetworkConfig()
focal_class.full_signature: public NetworkConfig createDefaultNetworkConfig()
focal_class.identifier: createDefaultNetworkConfig
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: NetworkConfig
focal_class.signature: NetworkConfig createDefaultNetworkConfig()
focal_class.class_method_signature: LeshanBootstrapServerBuilder.build()
focal_class.full_signature: public LeshanBootstrapServer build()
focal_class.identifier: build
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: LeshanBootstrapServer
focal_class.signature: LeshanBootstrapServer build()
focal_class.class_method_signature: LeshanBootstrapServerBuilder.shouldTryToCreateSecureEndpoint()
focal_class.full_signature: protected boolean shouldTryToCreateSecureEndpoint()
focal_class.identifier: shouldTryToCreateSecureEndpoint
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean shouldTryToCreateSecureEndpoint()
focal_class.class_method_signature: LeshanBootstrapServerBuilder.createBootstrapServer(CoapEndpoint unsecuredEndpoint, CoapEndpoint securedEndpoint,
              BootstrapConfigStore bsStore, BootstrapSecurityStore bsSecurityStore,
              BootstrapSessionManager bsSessionManager, BootstrapHandlerFactory bsHandlerFactory, LwM2mModel model,
              NetworkConfig coapConfig, LwM2mNodeEncoder encoder, LwM2mNodeDecoder decoder)
focal_class.full_signature: protected LeshanBootstrapServer createBootstrapServer(CoapEndpoint unsecuredEndpoint, CoapEndpoint securedEndpoint,
              BootstrapConfigStore bsStore, BootstrapSecurityStore bsSecurityStore,
              BootstrapSessionManager bsSessionManager, BootstrapHandlerFactory bsHandlerFactory, LwM2mModel model,
              NetworkConfig coapConfig, LwM2mNodeEncoder encoder, LwM2mNodeDecoder decoder)
focal_class.identifier: createBootstrapServer
focal_class.modifiers: protected
focal_class.parameters: (CoapEndpoint unsecuredEndpoint, CoapEndpoint securedEndpoint,
              BootstrapConfigStore bsStore, BootstrapSecurityStore bsSecurityStore,
              BootstrapSessionManager bsSessionManager, BootstrapHandlerFactory bsHandlerFactory, LwM2mModel model,
              NetworkConfig coapConfig, LwM2mNodeEncoder encoder, LwM2mNodeDecoder decoder)
focal_class.return: LeshanBootstrapServer
focal_class.signature: LeshanBootstrapServer createBootstrapServer(CoapEndpoint unsecuredEndpoint, CoapEndpoint securedEndpoint,
              BootstrapConfigStore bsStore, BootstrapSecurityStore bsSecurityStore,
              BootstrapSessionManager bsSessionManager, BootstrapHandlerFactory bsHandlerFactory, LwM2mModel model,
              NetworkConfig coapConfig, LwM2mNodeEncoder encoder, LwM2mNodeDecoder decoder)
focal_method.body: public LeshanBootstrapServer build() {
          if (localAddress == null)
              localAddress = new InetSocketAddress(LwM2m.DEFAULT_COAP_PORT);
          if (configStore == null)
              configStore = new InMemoryBootstrapConfigStore();
  
          if (sessionManager == null)
              sessionManager = new DefaultBootstrapSessionManager(securityStore);
          if (bootstrapHandlerFactory == null)
              bootstrapHandlerFactory = new BootstrapHandlerFactory() {
                  @Override
                  public BootstrapHandler create(BootstrapConfigStore store, LwM2mBootstrapRequestSender sender,
                          BootstrapSessionManager sessionManager) {
                      return new DefaultBootstrapHandler(store, sender, sessionManager);
                  }
              };
          if (model == null)
              model = new StaticModel(ObjectLoader.loadDefault());
          if (coapConfig == null) {
              coapConfig = createDefaultNetworkConfig();
          }
          if (endpointFactory == null) {
              endpointFactory = new DefaultEndpointFactory("LWM2M BS Server");
          }
          if (encoder == null)
              encoder = new DefaultLwM2mNodeEncoder();
          if (decoder == null)
              decoder = new DefaultLwM2mNodeDecoder();
  
          // handle dtlsConfig
          DtlsConnectorConfig dtlsConfig = null;
          if (!noSecuredEndpoint && shouldTryToCreateSecureEndpoint()) {
              if (dtlsConfigBuilder == null) {
                  dtlsConfigBuilder = new DtlsConnectorConfig.Builder();
              }
              // Set default DTLS setting for Leshan unless user change it.
              DtlsConnectorConfig incompleteConfig = dtlsConfigBuilder.getIncompleteConfig();
  
              // Handle PSK Store
              if (incompleteConfig.getAdvancedPskStore() != null) {
                  LOG.warn(
                          "PskStore should be automatically set by Leshan. Using a custom implementation is not advised.");
              } else if (securityStore != null) {
                  dtlsConfigBuilder.setPskStore(new LwM2mBootstrapPskStore(securityStore));
              }
  
              // Handle secure address
              if (incompleteConfig.getAddress() == null) {
                  if (localAddressSecure == null) {
                      localAddressSecure = new InetSocketAddress(LwM2m.DEFAULT_COAP_SECURE_PORT);
                  }
                  dtlsConfigBuilder.setAddress(localAddressSecure);
              } else if (localAddressSecure != null && !localAddressSecure.equals(incompleteConfig.getAddress())) {
                  throw new IllegalStateException(String.format(
                          "Configuration conflict between LeshanBuilder and DtlsConnectorConfig.Builder for secure address: %s != %s",
                          localAddressSecure, incompleteConfig.getAddress()));
              }
  
              // Handle active peers
              if (incompleteConfig.getMaxConnections() == null)
                  dtlsConfigBuilder.setMaxConnections(coapConfig.getInt(Keys.MAX_ACTIVE_PEERS));
              if (incompleteConfig.getStaleConnectionThreshold() == null)
                  dtlsConfigBuilder.setStaleConnectionThreshold(coapConfig.getLong(Keys.MAX_PEER_INACTIVITY_PERIOD));
  
              // handle trusted certificates
              if (trustedCertificates != null) {
                  if (incompleteConfig.getCertificateVerifier() == null) {
                      if (incompleteConfig.getTrustStore() == null) {
                          dtlsConfigBuilder.setTrustStore(trustedCertificates);
                      } else if (!Arrays.equals(trustedCertificates, incompleteConfig.getTrustStore())) {
                          throw new IllegalStateException(String.format(
                                  "Configuration conflict between LeshanBuilder and DtlsConnectorConfig.Builder for trusted Certificates (trustStore) : \n%s != \n%s",
                                  Arrays.toString(trustedCertificates),
                                  Arrays.toString(incompleteConfig.getTrustStore())));
                      }
                  } else if (trustedCertificates != null) {
                      throw new IllegalStateException(
                              "Configuration conflict between LeshanBuilder and DtlsConnectorConfig.Builder: if a CertificateVerifier is set, trustedCertificates must not be set.");
                  }
              }
  
              if (privateKey != null) {
                  // check conflict for private key
                  if (incompleteConfig.getPrivateKey() != null && !incompleteConfig.getPrivateKey().equals(privateKey)) {
                      throw new IllegalStateException(String.format(
                              "Configuration conflict between LeshanBuilder and DtlsConnectorConfig.Builder for private key: %s != %s",
                              privateKey, incompleteConfig.getPrivateKey()));
                  }
  
                  // if in raw key mode and not in X.509 set the raw keys
                  if (certificateChain == null && publicKey != null) {
                      if (incompleteConfig.getPublicKey() != null && !incompleteConfig.getPublicKey().equals(publicKey)) {
                          throw new IllegalStateException(String.format(
                                  "Configuration conflict between LeshanBuilder and DtlsConnectorConfig.Builder for public key: %s != %s",
                                  publicKey, incompleteConfig.getPublicKey()));
                      }
                      // by default trust all RPK
                      if (incompleteConfig.getRpkTrustStore() == null) {
                          dtlsConfigBuilder.setRpkTrustAll();
                      }
                      dtlsConfigBuilder.setIdentity(privateKey, publicKey);
                  }
                  // if in X.509 mode set the private key, certificate chain, public key is extracted from the certificate
                  if (certificateChain != null && certificateChain.length > 0) {
                      if (incompleteConfig.getCertificateChain() != null
                              && !Arrays.asList(certificateChain).equals(incompleteConfig.getCertificateChain())) {
                          throw new IllegalStateException(String.format(
                                  "Configuration conflict between LeshanBuilder and DtlsConnectorConfig.Builder for certificate chain: %s != %s",
                                  Arrays.toString(certificateChain), incompleteConfig.getCertificateChain()));
                      }
  
                      // by default trust all RPK
                      if (incompleteConfig.getRpkTrustStore() == null) {
                          dtlsConfigBuilder.setRpkTrustAll();
                      }
                      dtlsConfigBuilder.setIdentity(privateKey, certificateChain, CertificateType.X_509,
                              CertificateType.RAW_PUBLIC_KEY);
                  }
              }
  
              // Bootstrap Server acts as Server only : It does not need to initiate handshake
              if (incompleteConfig.isServerOnly() == null) {
                  dtlsConfigBuilder.setServerOnly(true);
              }
  
              // Deactivate SNI by default
              // TODO should we support SNI ?
              if (incompleteConfig.isSniEnabled() == null) {
                  dtlsConfigBuilder.setSniEnabled(false);
              }
  
              // we try to build the dtlsConfig, if it fail we will just not create the secured endpoint
              try {
                  dtlsConfig = dtlsConfigBuilder.build();
              } catch (IllegalStateException e) {
                  LOG.warn("Unable to create DTLS config and so secured endpoint.", e);
              }
          }
  
          CoapEndpoint unsecuredEndpoint = null;
          if (!noUnsecuredEndpoint) {
              unsecuredEndpoint = endpointFactory.createUnsecuredEndpoint(localAddress, coapConfig, null);
          }
  
          CoapEndpoint securedEndpoint = null;
          if (!noSecuredEndpoint && dtlsConfig != null) {
              securedEndpoint = endpointFactory.createSecuredEndpoint(dtlsConfig, coapConfig, null);
          }
  
          if (securedEndpoint == null && unsecuredEndpoint == null) {
              throw new IllegalStateException(
                      "All CoAP enpoints are deactivated, at least one endpoint should be activated");
          }
  
          return createBootstrapServer(unsecuredEndpoint, securedEndpoint, configStore, securityStore, sessionManager,
                  bootstrapHandlerFactory, model, coapConfig, encoder, decoder);
      }
focal_method.class_method_signature: LeshanBootstrapServerBuilder.build()
focal_method.full_signature: public LeshanBootstrapServer build()
focal_method.identifier: build
focal_method.invocations: loadDefault createDefaultNetworkConfig shouldTryToCreateSecureEndpoint getIncompleteConfig getAdvancedPskStore warn setPskStore getAddress setAddress equals getAddress format getAddress getMaxConnections setMaxConnections getInt getStaleConnectionThreshold setStaleConnectionThreshold getLong getCertificateVerifier getTrustStore setTrustStore equals getTrustStore format toString toString getTrustStore getPrivateKey equals getPrivateKey format getPrivateKey getPublicKey equals getPublicKey format getPublicKey getRpkTrustStore setRpkTrustAll setIdentity getCertificateChain equals asList getCertificateChain format toString getCertificateChain getRpkTrustStore setRpkTrustAll setIdentity isServerOnly setServerOnly isSniEnabled setSniEnabled build warn createUnsecuredEndpoint createSecuredEndpoint createBootstrapServer
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: LeshanBootstrapServer
focal_method.signature: LeshanBootstrapServer build()