org.neo4j.kernel.configuration.Config.httpConnectors()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中org.neo4j.kernel.configuration.Config.httpConnectors()方法的一些代码示例,展示了Config.httpConnectors()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Config.httpConnectors()方法的具体详情如下:
包路径:org.neo4j.kernel.configuration.Config
类名称:Config
方法名:httpConnectors

Config.httpConnectors介绍

暂无

代码示例

代码示例来源:origin: neo4j/neo4j

/**
 * @return list of all configured http connectors
 */
@Nonnull
public List<HttpConnector> httpConnectors()
{
  return httpConnectors( params ).collect( Collectors.toList() );
}

代码示例来源:origin: neo4j/neo4j

/**
 * @return list of all configured http connectors which are enabled
 */
@Nonnull
private List<HttpConnector> enabledHttpConnectors( @Nonnull Map<String,String> params )
{
  return httpConnectors( params )
      .filter( c -> c.enabled.apply( params::get ) )
      .collect( Collectors.toList() );
}

代码示例来源:origin: neo4j/neo4j

@Test
void shouldBeAbleToDisableHttpConnectorWithJustOneParameter()
{
  // given
  Config disableHttpConfig = Config.defaults(
      stringMap( "dbms.connector.http.enabled", "false",
          "dbms.connector.https.enabled", "false" ) );
  // then
  assertTrue( disableHttpConfig.enabledHttpConnectors().isEmpty() );
  assertEquals( 2, disableHttpConfig.httpConnectors().size() );
}

代码示例来源:origin: neo4j/neo4j

config.setLogger( log );
serverAddress =  config.httpConnectors().stream()
    .filter( c -> Encryption.NONE.equals( c.encryptionLevel() ) )
    .findFirst()

代码示例来源:origin: neo4j/neo4j

@Test
void testServerDefaultSettings()
{
  // given
  Config config = Config.builder().withServerDefaults().build();
  // when
  List<HttpConnector> connectors = config.httpConnectors();
  // then
  assertEquals( 2, connectors.size() );
  if ( connectors.get( 0 ).encryptionLevel().equals( TLS ) )
  {
    assertEquals( new ListenSocketAddress( "localhost", 7474 ),
        config.get( connectors.get( 1 ).listen_address ) );
    assertEquals( new ListenSocketAddress( "localhost", 7473 ),
        config.get( connectors.get( 0 ).listen_address ) );
  }
  else
  {
    assertEquals( new ListenSocketAddress( "127.0.0.1", 7474 ),
        config.get( connectors.get( 0 ).listen_address ) );
    assertEquals( new ListenSocketAddress( "127.0.0.1", 7473 ),
        config.get( connectors.get( 1 ).listen_address ) );
  }
}

代码示例来源:origin: org.neo4j/neo4j-kernel

/**
 * @return list of all configured http connectors
 */
@Nonnull
public List<HttpConnector> httpConnectors()
{
  return httpConnectors( params ).collect( Collectors.toList() );
}

代码示例来源:origin: org.neo4j/neo4j-kernel

/**
 * @return list of all configured http connectors which are enabled
 */
@Nonnull
private List<HttpConnector> enabledHttpConnectors( @Nonnull Map<String,String> params )
{
  return httpConnectors( params )
      .filter( c -> c.enabled.apply( params::get ) )
      .collect( Collectors.toList() );
}

代码示例来源:origin: org.neo4j.app/neo4j-server

config.setLogger( log );
serverAddress =  config.httpConnectors().stream()
    .filter( c -> Encryption.NONE.equals( c.encryptionLevel() ) )
    .findFirst()

相关文章