Fixed javadoc links

This commit is contained in:
Juergen Hoeller 2014-07-18 17:21:44 +02:00
parent 3be190df6a
commit 188e58c46a
10 changed files with 70 additions and 53 deletions

View File

@ -23,14 +23,14 @@ import org.springframework.cache.interceptor.CacheResolver;
* Extension of {@link CachingConfigurer} for the JSR-107 implementation.
*
* <p>To be implemented by classes annotated with
* @{@link org.springframework.cache.annotation.EnableCaching} that wish or
* need to specify explicitly how exception caches are resolved for
* {@link org.springframework.cache.annotation.EnableCaching} that wish
* or need to specify explicitly how exception caches are resolved for
* annotation-driven cache management. Consider extending {@link JCacheConfigurerSupport},
* which provides a stub implementation of all interface methods.
*
* <p>See @{@link org.springframework.cache.annotation.EnableCaching} for
* general examples and context; see {@link #exceptionCacheResolver()} for detailed
* instructions.
* <p>See {@link org.springframework.cache.annotation.EnableCaching} for
* general examples and context; see {@link #exceptionCacheResolver()} for
* detailed instructions.
*
* @author Stephane Nicoll
* @since 4.1

View File

@ -69,6 +69,7 @@ public class JCacheAspectSupport extends AbstractCacheInvoker implements Initial
private CacheRemoveAllInterceptor cacheRemoveAllInterceptor;
public void setCacheOperationSource(JCacheOperationSource cacheOperationSource) {
Assert.notNull(cacheOperationSource);
this.cacheOperationSource = cacheOperationSource;
@ -158,9 +159,8 @@ public class JCacheAspectSupport extends AbstractCacheInvoker implements Initial
/**
* Execute the underlying operation (typically in case of cache miss) and return
* the result of the invocation. If an exception occurs it will be wrapped in
* a {@link CacheOperationInvoker.ThrowableWrapper}: the exception can be handled
* or modified but it <em>must</em> be wrapped in a
* {@link CacheOperationInvoker.ThrowableWrapper} as well.
* a {@code ThrowableWrapper}: the exception can be handled or modified but it
* <em>must</em> be wrapped in a {@code ThrowableWrapper} as well.
* @param invoker the invoker handling the operation being cached
* @return the result of the invocation
* @see CacheOperationInvoker#invoke()
@ -169,15 +169,18 @@ public class JCacheAspectSupport extends AbstractCacheInvoker implements Initial
return invoker.invoke();
}
private class CacheOperationInvokerAdapter implements CacheOperationInvoker {
private final CacheOperationInvoker delegate;
private CacheOperationInvokerAdapter(CacheOperationInvoker delegate) {this.delegate = delegate;}
public CacheOperationInvokerAdapter(CacheOperationInvoker delegate) {
this.delegate = delegate;
}
@Override
public Object invoke() throws ThrowableWrapper {
return invokeOperation(delegate);
return invokeOperation(this.delegate);
}
}

View File

@ -1,3 +1,19 @@
/*
* Copyright 2002-2014 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cache.jcache.interceptor;
import java.lang.annotation.Annotation;
@ -13,7 +29,7 @@ import javax.cache.annotation.GeneratedCacheKey;
* the {@link javax.cache.annotation.CacheValue} one.
*
* @author Stephane Nicoll
* @see 4.1
* @since 4.1
* @see javax.cache.annotation.CacheKeyInvocationContext#getKeyParameters()
*/
public class SimpleCacheKeyGenerator implements CacheKeyGenerator {

View File

@ -21,8 +21,8 @@ import javax.cache.annotation.CacheResult;
import org.springframework.cache.interceptor.CacheResolver;
import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.util.StringUtils;
import org.springframework.util.ExceptionTypeFilter;
import org.springframework.util.StringUtils;
/**
* The {@link JCacheOperation} implementation for a {@link CacheResult} operation.
@ -47,8 +47,7 @@ public class CacheResultOperation extends BaseKeyCacheOperation<CacheResult> {
CacheResult ann = methodDetails.getCacheAnnotation();
this.exceptionTypeFilter = createExceptionTypeFilter(ann.cachedExceptions(), ann.nonCachedExceptions());
this.exceptionCacheResolver = exceptionCacheResolver;
String exceptionCacheNameCandidate = ann.exceptionCacheName();
this.exceptionCacheName = StringUtils.hasText(exceptionCacheNameCandidate) ? exceptionCacheNameCandidate : null;
this.exceptionCacheName = (StringUtils.hasText(ann.exceptionCacheName()) ? ann.exceptionCacheName() : null);
}
@ -58,8 +57,8 @@ public class CacheResultOperation extends BaseKeyCacheOperation<CacheResult> {
}
/**
* Specify if the method should always be invoked regardless of a cache hit. By
* default, the method is only invoked in case of a cache miss.
* Specify if the method should always be invoked regardless of a cache hit.
* By default, the method is only invoked in case of a cache miss.
* @see javax.cache.annotation.CacheResult#skipGet()
*/
public boolean isAlwaysInvoked() {
@ -75,7 +74,7 @@ public class CacheResultOperation extends BaseKeyCacheOperation<CacheResult> {
}
/**
* Return the name of the cache to cache exceptions. Return {@link null} if
* Return the name of the cache to cache exceptions, or {@code null} if
* caching exceptions should be disabled.
* @see javax.cache.annotation.CacheResult#exceptionCacheName()
*/

View File

@ -310,7 +310,7 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe
* reference into the JobDataMap but rather into the SchedulerContext.
* @param schedulerContextAsMap Map with String keys and any objects as
* values (for example Spring-managed beans)
* @see JobDetailBean#setJobDataAsMap
* @see JobDetailFactoryBean#setJobDataAsMap
*/
public void setSchedulerContextAsMap(Map<String, ?> schedulerContextAsMap) {
this.schedulerContextMap = schedulerContextAsMap;
@ -328,8 +328,8 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe
* correspond to a "setApplicationContext" method in that scenario.
* <p>Note that BeanFactory callback interfaces like ApplicationContextAware
* are not automatically applied to Quartz Job instances, because Quartz
* itself is reponsible for the lifecycle of its Jobs.
* @see JobDetailBean#setApplicationContextJobDataKey
* itself is responsible for the lifecycle of its Jobs.
* @see JobDetailFactoryBean#setApplicationContextJobDataKey
* @see org.springframework.context.ApplicationContext
*/
public void setApplicationContextSchedulerContextKey(String applicationContextSchedulerContextKey) {

View File

@ -18,6 +18,7 @@ package org.springframework.messaging.simp.annotation.support;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.core.MethodParameter;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHeaders;
@ -56,20 +57,19 @@ public class SubscriptionMethodReturnValueHandler implements HandlerMethodReturn
/**
* Class constructor.
*
* @param messagingTemplate a messaging template to send messages to, most
* likely the "clientOutboundChannel", must not be {@link null}.
* Construct a new SubscriptionMethodReturnValueHandler.
* @param messagingTemplate a messaging template to send messages to,
* most likely the "clientOutboundChannel" (must not be {@code null})
*/
public SubscriptionMethodReturnValueHandler(MessageSendingOperations<String> messagingTemplate) {
Assert.notNull(messagingTemplate, "messagingTemplate must not be null");
this.messagingTemplate = messagingTemplate;
}
/**
* Configure a {@link MessageHeaderInitializer} to apply to the headers of all
* messages sent to the client outbound channel.
*
* <p>By default this property is not set.
*/
public void setHeaderInitializer(MessageHeaderInitializer headerInitializer) {
@ -77,7 +77,7 @@ public class SubscriptionMethodReturnValueHandler implements HandlerMethodReturn
}
/**
* @return the configured header initializer.
* Return the configured header initializer.
*/
public MessageHeaderInitializer getHeaderInitializer() {
return this.headerInitializer;
@ -86,9 +86,9 @@ public class SubscriptionMethodReturnValueHandler implements HandlerMethodReturn
@Override
public boolean supportsReturnType(MethodParameter returnType) {
return ((returnType.getMethodAnnotation(SubscribeMapping.class) != null)
&& (returnType.getMethodAnnotation(SendTo.class) == null)
&& (returnType.getMethodAnnotation(SendToUser.class) == null));
return (returnType.getMethodAnnotation(SubscribeMapping.class) != null &&
returnType.getMethodAnnotation(SendTo.class) == null &&
returnType.getMethodAnnotation(SendToUser.class) == null);
}
@Override
@ -96,6 +96,7 @@ public class SubscriptionMethodReturnValueHandler implements HandlerMethodReturn
if (returnValue == null) {
return;
}
MessageHeaders headers = message.getHeaders();
String destination = SimpMessageHeaderAccessor.getDestination(headers);
String sessionId = SimpMessageHeaderAccessor.getSessionId(headers);

View File

@ -39,7 +39,7 @@ import org.springframework.util.CollectionUtils;
* @since 4.0
*/
public abstract class AbstractBrokerMessageHandler
implements MessageHandler, SmartLifecycle, ApplicationEventPublisherAware {
implements MessageHandler, ApplicationEventPublisherAware, SmartLifecycle {
protected final Log logger = LogFactory.getLog(getClass());
@ -56,10 +56,10 @@ public abstract class AbstractBrokerMessageHandler
private boolean autoStartup = true;
private Object lifecycleMonitor = new Object();
private volatile boolean running = false;
private final Object lifecycleMonitor = new Object();
public AbstractBrokerMessageHandler() {
this(Collections.<String>emptyList());
@ -100,7 +100,6 @@ public abstract class AbstractBrokerMessageHandler
/**
* Check whether this message handler is currently running.
*
* <p>Note that even when this message handler is running the
* {@link #isBrokerAvailable()} flag may still independently alternate between
* being on and off depending on the concrete sub-class implementation.
@ -112,23 +111,6 @@ public abstract class AbstractBrokerMessageHandler
}
}
/**
* Whether the message broker is currently available and able to process messages.
*
* <p>Note that this is in addition to the {@link #isRunning()} flag, which
* indicates whether this message handler is running. In other words the message
* handler must first be running and then the {@link #isBrokerAvailable()} flag
* may still independently alternate between being on and off depending on the
* concrete sub-class implementation.
*
* <p>Application components may implement
* {@link org.springframework.context.ApplicationListener<BrokerAvailabilityEvent>>}
* to receive notifications when broker becomes available and unavailable.
*/
public boolean isBrokerAvailable() {
return this.brokerAvailable.get();
}
@Override
public void start() {
synchronized (this.lifecycleMonitor) {
@ -171,6 +153,22 @@ public abstract class AbstractBrokerMessageHandler
}
}
/**
* Whether the message broker is currently available and able to process messages.
* <p>Note that this is in addition to the {@link #isRunning()} flag, which
* indicates whether this message handler is running. In other words the message
* handler must first be running and then the {@code #isBrokerAvailable()} flag
* may still independently alternate between being on and off depending on the
* concrete sub-class implementation.
* <p>Application components may implement
* {@code org.springframework.context.ApplicationListener&lt;BrokerAvailabilityEvent&gt;}
* to receive notifications when broker becomes available and unavailable.
*/
public boolean isBrokerAvailable() {
return this.brokerAvailable.get();
}
@Override
public void handleMessage(Message<?> message) {
if (!this.running) {

View File

@ -40,7 +40,7 @@ public class IdTimestampMessageHeaderInitializer implements MessageHeaderInitial
* instances with.
* <p>By default this property is set to {@code null} in which case the default
* IdGenerator of {@link org.springframework.messaging.MessageHeaders} is used.
* <p>To have no id's generated at all, see {@@link #setDisableIdGeneration()}.
* <p>To have no id's generated at all, see {@link #setDisableIdGeneration()}.
*/
public void setIdGenerator(IdGenerator idGenerator) {
this.idGenerator = idGenerator;

View File

@ -341,7 +341,7 @@ public class Jackson2ObjectMapperFactoryBean implements FactoryBean<ObjectMapper
/**
* Specify a {@link com.fasterxml.jackson.databind.PropertyNamingStrategy} to
* configure the {@link ObjectMapper} with.
* @@since 4.0.2
* @since 4.0.2
*/
public void setPropertyNamingStrategy(PropertyNamingStrategy propertyNamingStrategy) {
this.propertyNamingStrategy = propertyNamingStrategy;

View File

@ -257,7 +257,7 @@ public class TilesConfigurer implements ServletContextAware, InitializingBean, D
}
/**
* Creates a new instance of {@link SpringTilesInitializer}.
* Creates a new instance of {@code SpringTilesInitializer}.
* <p>Override it to use a different initializer.
* @see org.apache.tiles.web.startup.AbstractTilesListener#createTilesInitializer()
*/