Polishing (includes minor performance refinements from master)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -58,8 +58,6 @@ public class HandlerMethod {
|
||||
public static final Log defaultLogger = LogFactory.getLog(HandlerMethod.class);
|
||||
|
||||
|
||||
protected Log logger = defaultLogger;
|
||||
|
||||
private final Object bean;
|
||||
|
||||
@Nullable
|
||||
@@ -76,6 +74,8 @@ public class HandlerMethod {
|
||||
@Nullable
|
||||
private HandlerMethod resolvedFromHandlerMethod;
|
||||
|
||||
protected Log logger = defaultLogger;
|
||||
|
||||
|
||||
/**
|
||||
* Create an instance from a bean instance and a method.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -43,8 +43,8 @@ public interface AsyncHandlerMethodReturnValueHandler extends HandlerMethodRetur
|
||||
* {@link #supportsReturnType(org.springframework.core.MethodParameter)}
|
||||
* is called and it returns {@code true}.
|
||||
* @param returnValue the value returned from the handler method
|
||||
* @param returnType the type of the return value.
|
||||
* @return true if the return value type represents an async value.
|
||||
* @param returnType the type of the return value
|
||||
* @return {@code true} if the return value type represents an async value
|
||||
*/
|
||||
boolean isAsyncReturnValue(Object returnValue, MethodParameter returnType);
|
||||
|
||||
@@ -58,9 +58,9 @@ public interface AsyncHandlerMethodReturnValueHandler extends HandlerMethodRetur
|
||||
* {@link #supportsReturnType(org.springframework.core.MethodParameter)}
|
||||
* is called and it returns {@code true}.
|
||||
* @param returnValue the value returned from the handler method
|
||||
* @param returnType the type of the return value.
|
||||
* @return the resulting ListenableFuture or {@code null} in which case no
|
||||
* further handling will be performed.
|
||||
* @param returnType the type of the return value
|
||||
* @return the resulting ListenableFuture, or {@code null} in which case
|
||||
* no further handling will be performed
|
||||
*/
|
||||
@Nullable
|
||||
ListenableFuture<?> toListenableFuture(Object returnValue, MethodParameter returnType);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -48,7 +48,7 @@ public class ReactiveReturnValueHandler extends AbstractAsyncReturnValueHandler
|
||||
|
||||
@Override
|
||||
public boolean supportsReturnType(MethodParameter returnType) {
|
||||
return this.adapterRegistry.getAdapter(returnType.getParameterType()) != null;
|
||||
return (this.adapterRegistry.getAdapter(returnType.getParameterType()) != null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,10 +42,10 @@ public abstract class AbstractMessageChannel implements MessageChannel, Intercep
|
||||
|
||||
protected Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
private final List<ChannelInterceptor> interceptors = new ArrayList<>(5);
|
||||
|
||||
private String beanName;
|
||||
|
||||
private final List<ChannelInterceptor> interceptors = new ArrayList<>(5);
|
||||
|
||||
|
||||
public AbstractMessageChannel() {
|
||||
this.beanName = getClass().getSimpleName() + "@" + ObjectUtils.getIdentityHexString(this);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -70,8 +70,6 @@ public class ReactorNettyTcpClient<P> implements TcpOperations<P> {
|
||||
|
||||
private static final int PUBLISH_ON_BUFFER_SIZE = 16;
|
||||
|
||||
private Log logger = LogFactory.getLog(ReactorNettyTcpClient.class);
|
||||
|
||||
|
||||
private final TcpClient tcpClient;
|
||||
|
||||
@@ -81,13 +79,15 @@ public class ReactorNettyTcpClient<P> implements TcpOperations<P> {
|
||||
private final ChannelGroup channelGroup;
|
||||
|
||||
@Nullable
|
||||
private LoopResources loopResources;
|
||||
private final LoopResources loopResources;
|
||||
|
||||
@Nullable
|
||||
private ConnectionProvider poolResources;
|
||||
private final ConnectionProvider poolResources;
|
||||
|
||||
private final Scheduler scheduler = Schedulers.newParallel("tcp-client-scheduler");
|
||||
|
||||
private Log logger = LogFactory.getLog(ReactorNettyTcpClient.class);
|
||||
|
||||
private volatile boolean stopping = false;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user