本文整理了Java中org.neo4j.kernel.configuration.Config.httpConnectors()
方法的一些代码示例,展示了Config.httpConnectors()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Config.httpConnectors()
方法的具体详情如下:
包路径:org.neo4j.kernel.configuration.Config
类名称: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()
内容来源于网络,如有侵权,请联系作者删除!