org.springframework.boot.web.embedded.netty.NettyServerCustomizer Java Examples

The following examples show how to use org.springframework.boot.web.embedded.netty.NettyServerCustomizer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RSocketNettyReactiveWebServerFactory.java    From spring-boot-rsocket with Apache License 2.0 4 votes vote down vote up
/**
 * Set {@link NettyServerCustomizer}s that should be applied to the Netty server
 * builder. Calling this method will replace any existing customizers.
 * @param serverCustomizers the customizers to set
 */
public void setServerCustomizers(
		Collection<? extends NettyServerCustomizer> serverCustomizers) {
	Assert.notNull(serverCustomizers, "ServerCustomizers must not be null");
	this.serverCustomizers = new ArrayList<>(serverCustomizers);
}
 
Example #2
Source File: RSocketNettyReactiveWebServerFactory.java    From spring-boot-rsocket with Apache License 2.0 4 votes vote down vote up
/**
 * Add {@link NettyServerCustomizer}s that should applied while building the server.
 * @param serverCustomizers the customizers to add
 */
public void addServerCustomizers(NettyServerCustomizer... serverCustomizers) {
	Assert.notNull(serverCustomizers, "ServerCustomizer must not be null");
	this.serverCustomizers.addAll(Arrays.asList(serverCustomizers));
}
 
Example #3
Source File: RSocketNettyReactiveWebServerFactory.java    From spring-boot-rsocket with Apache License 2.0 4 votes vote down vote up
private HttpServer applyCustomizers(HttpServer server) {
	for (NettyServerCustomizer customizer : this.serverCustomizers) {
		server = customizer.apply(server);
	}
	return server;
}
 
Example #4
Source File: RSocketNettyReactiveWebServerFactory.java    From spring-boot-rsocket with Apache License 2.0 2 votes vote down vote up
/**
 * Returns a mutable collection of the {@link NettyServerCustomizer}s that will be
 * applied to the Netty server builder.
 * @return the customizers that will be applied
 */
public Collection<NettyServerCustomizer> getServerCustomizers() {
	return this.serverCustomizers;
}