Replace <code> with {@code} throughout Javadoc
Issue: SPR-10128
This commit is contained in:
@@ -40,10 +40,10 @@ public interface Cache {
|
||||
|
||||
/**
|
||||
* Return the value to which this cache maps the specified key. Returns
|
||||
* <code>null</code> if the cache contains no mapping for this key.
|
||||
* {@code null} if the cache contains no mapping for this key.
|
||||
* @param key key whose associated value is to be returned.
|
||||
* @return the value to which this cache maps the specified key,
|
||||
* or <code>null</code> if the cache contains no mapping for this key
|
||||
* or {@code null} if the cache contains no mapping for this key
|
||||
*/
|
||||
ValueWrapper get(Object key);
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ public class ConcurrentMapCache implements Cache {
|
||||
* given internal ConcurrentMap to use.
|
||||
* @param name the name of the cache
|
||||
* @param store the ConcurrentMap to use as an internal store
|
||||
* @param allowNullValues whether to allow <code>null</code> values
|
||||
* @param allowNullValues whether to allow {@code null} values
|
||||
* (adapting them to an internal null holder value)
|
||||
*/
|
||||
public ConcurrentMapCache(String name, ConcurrentMap<Object, Object> store, boolean allowNullValues) {
|
||||
@@ -115,7 +115,7 @@ public class ConcurrentMapCache implements Cache {
|
||||
|
||||
/**
|
||||
* Convert the given value from the internal store to a user value
|
||||
* returned from the get method (adapting <code>null</code>).
|
||||
* returned from the get method (adapting {@code null}).
|
||||
* @param storeValue the store value
|
||||
* @return the value to return to the user
|
||||
*/
|
||||
@@ -128,7 +128,7 @@ public class ConcurrentMapCache implements Cache {
|
||||
|
||||
/**
|
||||
* Convert the given user value, as passed into the put method,
|
||||
* to a value in the internal store (adapting <code>null</code>).
|
||||
* to a value in the internal store (adapting {@code null}).
|
||||
* @param userValue the given user value
|
||||
* @return the value to store
|
||||
*/
|
||||
|
||||
@@ -32,7 +32,7 @@ public class SimpleValueWrapper implements ValueWrapper {
|
||||
|
||||
/**
|
||||
* Create a new SimpleValueWrapper instance for exposing the given value.
|
||||
* @param value the value to expose (may be <code>null</code>)
|
||||
* @param value the value to expose (may be {@code null})
|
||||
*/
|
||||
public SimpleValueWrapper(Object value) {
|
||||
this.value = value;
|
||||
|
||||
@@ -59,7 +59,7 @@ public interface ApplicationContext extends EnvironmentCapable, ListableBeanFact
|
||||
|
||||
/**
|
||||
* Return the unique id of this application context.
|
||||
* @return the unique id of the context, or <code>null</code> if none
|
||||
* @return the unique id of the context, or {@code null} if none
|
||||
*/
|
||||
String getId();
|
||||
|
||||
@@ -71,8 +71,8 @@ public interface ApplicationContext extends EnvironmentCapable, ListableBeanFact
|
||||
|
||||
/**
|
||||
* Return a friendly name for this context.
|
||||
* @return a display name for this context (never <code>null</code>)
|
||||
*/
|
||||
* @return a display name for this context (never {@code null})
|
||||
*/
|
||||
String getDisplayName();
|
||||
|
||||
/**
|
||||
@@ -82,9 +82,9 @@ public interface ApplicationContext extends EnvironmentCapable, ListableBeanFact
|
||||
long getStartupDate();
|
||||
|
||||
/**
|
||||
* Return the parent context, or <code>null</code> if there is no parent
|
||||
* Return the parent context, or {@code null} if there is no parent
|
||||
* and this is the root of the context hierarchy.
|
||||
* @return the parent context, or <code>null</code> if there is no parent
|
||||
* @return the parent context, or {@code null} if there is no parent
|
||||
*/
|
||||
ApplicationContext getParent();
|
||||
|
||||
@@ -101,7 +101,7 @@ public interface ApplicationContext extends EnvironmentCapable, ListableBeanFact
|
||||
* @return the AutowireCapableBeanFactory for this context
|
||||
* @throws IllegalStateException if the context does not support
|
||||
* the AutowireCapableBeanFactory interface or does not hold an autowire-capable
|
||||
* bean factory yet (usually if <code>refresh()</code> has never been called)
|
||||
* bean factory yet (usually if {@code refresh()} has never been called)
|
||||
* @see ConfigurableApplicationContext#refresh()
|
||||
* @see ConfigurableApplicationContext#getBeanFactory()
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.beans.factory.Aware;
|
||||
* for bean lookup purposes.
|
||||
*
|
||||
* <p>This interface can also be implemented if an object needs access to file
|
||||
* resources, i.e. wants to call <code>getResource</code>, wants to publish
|
||||
* resources, i.e. wants to call {@code getResource}, wants to publish
|
||||
* an application event, or requires access to the MessageSource. However,
|
||||
* it is preferable to implement the more specific {@link ResourceLoaderAware},
|
||||
* {@link ApplicationEventPublisherAware} or {@link MessageSourceAware} interface
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.beans.FatalBeanException;
|
||||
public class ApplicationContextException extends FatalBeanException {
|
||||
|
||||
/**
|
||||
* Create a new <code>ApplicationContextException</code>
|
||||
* Create a new {@code ApplicationContextException}
|
||||
* with the specified detail message and no root cause.
|
||||
* @param msg the detail message
|
||||
*/
|
||||
@@ -35,7 +35,7 @@ public class ApplicationContextException extends FatalBeanException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new <code>ApplicationContextException</code>
|
||||
* Create a new {@code ApplicationContextException}
|
||||
* with the specified detail message and the given root cause.
|
||||
* @param msg the detail message
|
||||
* @param cause the root cause
|
||||
|
||||
@@ -36,7 +36,7 @@ public abstract class ApplicationEvent extends EventObject {
|
||||
|
||||
/**
|
||||
* Create a new ApplicationEvent.
|
||||
* @param source the component that published the event (never <code>null</code>)
|
||||
* @param source the component that published the event (never {@code null})
|
||||
*/
|
||||
public ApplicationEvent(Object source) {
|
||||
super(source);
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.EventListener;
|
||||
|
||||
/**
|
||||
* Interface to be implemented by application event listeners.
|
||||
* Based on the standard <code>java.util.EventListener</code> interface
|
||||
* Based on the standard {@code java.util.EventListener} interface
|
||||
* for the Observer design pattern.
|
||||
*
|
||||
* <p>As of Spring 3.0, an ApplicationListener can generically declare the event type
|
||||
|
||||
@@ -153,10 +153,10 @@ public interface ConfigurableApplicationContext extends ApplicationContext, Life
|
||||
/**
|
||||
* Close this application context, releasing all resources and locks that the
|
||||
* implementation might hold. This includes destroying all cached singleton beans.
|
||||
* <p>Note: Does <i>not</i> invoke <code>close</code> on a parent context;
|
||||
* <p>Note: Does <i>not</i> invoke {@code close} on a parent context;
|
||||
* parent contexts have their own, independent lifecycle.
|
||||
* <p>This method can be called multiple times without side effects: Subsequent
|
||||
* <code>close</code> calls on an already closed context will be ignored.
|
||||
* {@code close} calls on an already closed context will be ignored.
|
||||
*/
|
||||
void close();
|
||||
|
||||
|
||||
@@ -30,12 +30,12 @@ public interface HierarchicalMessageSource extends MessageSource {
|
||||
* that this object can't resolve.
|
||||
* @param parent the parent MessageSource that will be used to
|
||||
* resolve messages that this object can't resolve.
|
||||
* May be <code>null</code>, in which case no further resolution is possible.
|
||||
* May be {@code null}, in which case no further resolution is possible.
|
||||
*/
|
||||
void setParentMessageSource(MessageSource parent);
|
||||
|
||||
/**
|
||||
* Return the parent of this MessageSource, or <code>null</code> if none.
|
||||
* Return the parent of this MessageSource, or {@code null} if none.
|
||||
*/
|
||||
MessageSource getParentMessageSource();
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ public interface Lifecycle {
|
||||
|
||||
/**
|
||||
* Check whether this component is currently running.
|
||||
* <p>In the case of a container, this will return <code>true</code>
|
||||
* <p>In the case of a container, this will return {@code true}
|
||||
* only if <i>all</i> components that apply are currently running.
|
||||
* @return whether the component is currently running
|
||||
*/
|
||||
|
||||
@@ -44,7 +44,7 @@ public interface MessageSource {
|
||||
* qualified class name, thus avoiding conflict and ensuring maximum clarity.
|
||||
* @param args array of arguments that will be filled in for params within
|
||||
* the message (params look like "{0}", "{1,date}", "{2,time}" within a message),
|
||||
* or <code>null</code> if none.
|
||||
* or {@code null} if none.
|
||||
* @param defaultMessage String to return if the lookup fails
|
||||
* @param locale the Locale in which to do the lookup
|
||||
* @return the resolved message if the lookup was successful;
|
||||
@@ -58,7 +58,7 @@ public interface MessageSource {
|
||||
* @param code the code to lookup up, such as 'calculator.noRateSet'
|
||||
* @param args Array of arguments that will be filled in for params within
|
||||
* the message (params look like "{0}", "{1,date}", "{2,time}" within a message),
|
||||
* or <code>null</code> if none.
|
||||
* or {@code null} if none.
|
||||
* @param locale the Locale in which to do the lookup
|
||||
* @return the resolved message
|
||||
* @throws NoSuchMessageException if the message wasn't found
|
||||
@@ -68,10 +68,10 @@ public interface MessageSource {
|
||||
|
||||
/**
|
||||
* Try to resolve the message using all the attributes contained within the
|
||||
* <code>MessageSourceResolvable</code> argument that was passed in.
|
||||
* <p>NOTE: We must throw a <code>NoSuchMessageException</code> on this method
|
||||
* {@code MessageSourceResolvable} argument that was passed in.
|
||||
* <p>NOTE: We must throw a {@code NoSuchMessageException} on this method
|
||||
* since at the time of calling this method we aren't able to determine if the
|
||||
* <code>defaultMessage</code> property of the resolvable is null or not.
|
||||
* {@code defaultMessage} property of the resolvable is null or not.
|
||||
* @param resolvable value object storing attributes required to properly resolve a message
|
||||
* @param locale the Locale in which to do the lookup
|
||||
* @return the resolved message
|
||||
|
||||
@@ -46,7 +46,7 @@ public interface MessageSourceResolvable {
|
||||
|
||||
/**
|
||||
* Return the default message to be used to resolve this message.
|
||||
* @return the default message, or <code>null</code> if no default
|
||||
* @return the default message, or {@code null} if no default
|
||||
*/
|
||||
String getDefaultMessage();
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ import org.springframework.core.io.ResourceLoader;
|
||||
* to resolve resource patterns into arrays of Resource objects. This will always
|
||||
* work when running in an ApplicationContext (the context interface extends
|
||||
* ResourcePatternResolver). Use a PathMatchingResourcePatternResolver as default.
|
||||
* See also the <code>ResourcePatternUtils.getResourcePatternResolver</code> method.
|
||||
* See also the {@code ResourcePatternUtils.getResourcePatternResolver} method.
|
||||
*
|
||||
* <p>As alternative to a ResourcePatternResolver dependency, consider exposing
|
||||
* bean properties of type Resource array, populated via pattern Strings with
|
||||
@@ -64,11 +64,11 @@ public interface ResourceLoaderAware extends Aware {
|
||||
/**
|
||||
* Set the ResourceLoader that this object runs in.
|
||||
* <p>This might be a ResourcePatternResolver, which can be checked
|
||||
* through <code>instanceof ResourcePatternResolver</code>. See also the
|
||||
* <code>ResourcePatternUtils.getResourcePatternResolver</code> method.
|
||||
* through {@code instanceof ResourcePatternResolver}. See also the
|
||||
* {@code ResourcePatternUtils.getResourcePatternResolver} method.
|
||||
* <p>Invoked after population of normal bean properties but before an init callback
|
||||
* like InitializingBean's <code>afterPropertiesSet</code> or a custom init-method.
|
||||
* Invoked before ApplicationContextAware's <code>setApplicationContext</code>.
|
||||
* like InitializingBean's {@code afterPropertiesSet} or a custom init-method.
|
||||
* Invoked before ApplicationContextAware's {@code setApplicationContext}.
|
||||
* @param resourceLoader ResourceLoader object to be used by this object
|
||||
* @see org.springframework.core.io.support.ResourcePatternResolver
|
||||
* @see org.springframework.core.io.support.ResourcePatternUtils#getResourcePatternResolver
|
||||
|
||||
@@ -25,9 +25,9 @@ import org.springframework.context.ConfigurableApplicationContext;
|
||||
* ApplicationContext-specific implementation of BeanFactoryReference,
|
||||
* wrapping a newly created ApplicationContext, closing it on release.
|
||||
*
|
||||
* <p>As per BeanFactoryReference contract, <code>release</code> may be called
|
||||
* <p>As per BeanFactoryReference contract, {@code release} may be called
|
||||
* more than once, with subsequent calls not doing anything. However, calling
|
||||
* <code>getFactory</code> after a <code>release</code> call will cause an exception.
|
||||
* {@code getFactory} after a {@code release} call will cause an exception.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @author Colin Sampaleanu
|
||||
|
||||
@@ -50,9 +50,9 @@ public class ContextJndiBeanFactoryLocator extends JndiLocatorSupport implements
|
||||
|
||||
/**
|
||||
* Load/use a bean factory, as specified by a factory key which is a JNDI
|
||||
* address, of the form <code>java:comp/env/ejb/BeanFactoryPath</code>. The
|
||||
* address, of the form {@code java:comp/env/ejb/BeanFactoryPath}. The
|
||||
* contents of this JNDI location must be a string containing one or more
|
||||
* classpath resource names (separated by any of the delimiters '<code>,; \t\n</code>'
|
||||
* classpath resource names (separated by any of the delimiters '{@code ,; \t\n}'
|
||||
* if there is more than one. The resulting BeanFactory (or ApplicationContext)
|
||||
* will be created from the combined resources.
|
||||
* @see #createBeanFactory
|
||||
@@ -77,7 +77,7 @@ public class ContextJndiBeanFactoryLocator extends JndiLocatorSupport implements
|
||||
* Create the BeanFactory instance, given an array of class path resource Strings
|
||||
* which should be combined. This is split out as a separate method so that
|
||||
* subclasses can override the actual BeanFactory implementation class.
|
||||
* <p>Delegates to <code>createApplicationContext</code> by default,
|
||||
* <p>Delegates to {@code createApplicationContext} by default,
|
||||
* wrapping the result in a ContextBeanFactoryReference.
|
||||
* @param resources an array of Strings representing classpath resource names
|
||||
* @return the created BeanFactory, wrapped in a BeanFactoryReference
|
||||
|
||||
@@ -60,7 +60,7 @@ public class ContextSingletonBeanFactoryLocator extends SingletonBeanFactoryLoca
|
||||
/**
|
||||
* Returns an instance which uses the default "classpath*:beanRefContext.xml", as
|
||||
* the name of the definition file(s). All resources returned by the current
|
||||
* thread's context class loader's <code>getResources</code> method with this
|
||||
* thread's context class loader's {@code getResources} method with this
|
||||
* name will be combined to create a definition, which is just a BeanFactory.
|
||||
* @return the corresponding BeanFactoryLocator instance
|
||||
* @throws BeansException in case of factory loading failure
|
||||
@@ -73,7 +73,7 @@ public class ContextSingletonBeanFactoryLocator extends SingletonBeanFactoryLoca
|
||||
* Returns an instance which uses the the specified selector, as the name of the
|
||||
* definition file(s). In the case of a name with a Spring "classpath*:" prefix,
|
||||
* or with no prefix, which is treated the same, the current thread's context class
|
||||
* loader's <code>getResources</code> method will be called with this value to get
|
||||
* loader's {@code getResources} method will be called with this value to get
|
||||
* all resources having that name. These resources will then be combined to form a
|
||||
* definition. In the case where the name uses a Spring "classpath:" prefix, or
|
||||
* a standard URL prefix, then only one resource file will be loaded as the
|
||||
|
||||
@@ -79,7 +79,7 @@ public class AnnotationBeanNameGenerator implements BeanNameGenerator {
|
||||
/**
|
||||
* Derive a bean name from one of the annotations on the class.
|
||||
* @param annotatedDef the annotation-aware bean definition
|
||||
* @return the bean name, or <code>null</code> if none is found
|
||||
* @return the bean name, or {@code null} if none is found
|
||||
*/
|
||||
protected String determineBeanNameFromAnnotation(AnnotatedBeanDefinition annotatedDef) {
|
||||
AnnotationMetadata amd = annotatedDef.getMetadata();
|
||||
@@ -103,7 +103,7 @@ public class AnnotationBeanNameGenerator implements BeanNameGenerator {
|
||||
|
||||
/**
|
||||
* Check whether the given annotation is a stereotype that is allowed
|
||||
* to suggest a component name through its annotation <code>value()</code>.
|
||||
* to suggest a component name through its annotation {@code value()}.
|
||||
* @param annotationType the name of the annotation class to check
|
||||
* @param metaAnnotationTypes the names of meta-annotations on the given annotation
|
||||
* @param attributes the map of attributes for the given annotation
|
||||
@@ -124,7 +124,7 @@ public class AnnotationBeanNameGenerator implements BeanNameGenerator {
|
||||
* <p>The default implementation delegates to {@link #buildDefaultBeanName(BeanDefinition)}.
|
||||
* @param definition the bean definition to build a bean name for
|
||||
* @param registry the registry that the given bean definition is being registered with
|
||||
* @return the default bean name (never <code>null</code>)
|
||||
* @return the default bean name (never {@code null})
|
||||
*/
|
||||
protected String buildDefaultBeanName(BeanDefinition definition, BeanDefinitionRegistry registry) {
|
||||
return buildDefaultBeanName(definition);
|
||||
@@ -138,7 +138,7 @@ public class AnnotationBeanNameGenerator implements BeanNameGenerator {
|
||||
* "outerClassName.innerClassName", which because of the period in the
|
||||
* name may be an issue if you are autowiring by name.
|
||||
* @param definition the bean definition to build a bean name for
|
||||
* @return the default bean name (never <code>null</code>)
|
||||
* @return the default bean name (never {@code null})
|
||||
*/
|
||||
protected String buildDefaultBeanName(BeanDefinition definition) {
|
||||
String shortClassName = ClassUtils.getShortName(definition.getBeanClassName());
|
||||
|
||||
@@ -170,7 +170,7 @@ public class AnnotationConfigUtils {
|
||||
* Register all relevant annotation post processors in the given registry.
|
||||
* @param registry the registry to operate on
|
||||
* @param source the configuration source element (already extracted)
|
||||
* that this registration was triggered from. May be <code>null</code>.
|
||||
* that this registration was triggered from. May be {@code null}.
|
||||
* @return a Set of BeanDefinitionHolders, containing all bean definitions
|
||||
* that have actually been registered by this call
|
||||
*/
|
||||
|
||||
@@ -44,7 +44,7 @@ public class AnnotationScopeMetadataResolver implements ScopeMetadataResolver {
|
||||
private final ScopedProxyMode defaultProxyMode;
|
||||
|
||||
/**
|
||||
* Create a new instance of the <code>AnnotationScopeMetadataResolver</code> class.
|
||||
* Create a new instance of the {@code AnnotationScopeMetadataResolver} class.
|
||||
* @see #AnnotationScopeMetadataResolver(ScopedProxyMode)
|
||||
* @see ScopedProxyMode#NO
|
||||
*/
|
||||
@@ -53,7 +53,7 @@ public class AnnotationScopeMetadataResolver implements ScopeMetadataResolver {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new instance of the <code>AnnotationScopeMetadataResolver</code> class.
|
||||
* Create a new instance of the {@code AnnotationScopeMetadataResolver} class.
|
||||
* @param defaultProxyMode the desired scoped-proxy mode
|
||||
*/
|
||||
public AnnotationScopeMetadataResolver(ScopedProxyMode defaultProxyMode) {
|
||||
|
||||
@@ -78,7 +78,7 @@ import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
* classes. In this case, bean methods may reference other {@code @Bean} methods
|
||||
* in the same class by calling them <i>directly</i>. This ensures that references between
|
||||
* beans are strongly typed and navigable. Such so-called <em>'inter-bean references'</em> are
|
||||
* guaranteed to respect scoping and AOP semantics, just like <code>getBean()</code> lookups
|
||||
* guaranteed to respect scoping and AOP semantics, just like {@code getBean()} lookups
|
||||
* would. These are the semantics known from the original 'Spring JavaConfig' project
|
||||
* which require CGLIB subclassing of each such configuration class at runtime. As a
|
||||
* consequence, {@code @Configuration} classes and their factory methods must not be
|
||||
|
||||
@@ -291,8 +291,8 @@ public class ClassPathBeanDefinitionScanner extends ClassPathScanningCandidateCo
|
||||
* bean definition needs to be registered or conflicts with an existing definition.
|
||||
* @param beanName the suggested name for the bean
|
||||
* @param beanDefinition the corresponding bean definition
|
||||
* @return <code>true</code> if the bean can be registered as-is;
|
||||
* <code>false</code> if it should be skipped because there is an
|
||||
* @return {@code true} if the bean can be registered as-is;
|
||||
* {@code false} if it should be skipped because there is an
|
||||
* existing, compatible bean definition for the specified name
|
||||
* @throws ConflictingBeanDefinitionException if an existing, incompatible
|
||||
* bean definition has been found for the specified name
|
||||
|
||||
@@ -69,7 +69,7 @@ import org.springframework.util.StringUtils;
|
||||
/**
|
||||
* {@link org.springframework.beans.factory.config.BeanPostProcessor} implementation
|
||||
* that supports common Java annotations out of the box, in particular the JSR-250
|
||||
* annotations in the <code>javax.annotation</code> package. These common Java
|
||||
* annotations in the {@code javax.annotation} package. These common Java
|
||||
* annotations are supported in many Java EE 5 technologies (e.g. JSF 1.2),
|
||||
* as well as in Java 6's JAX-WS.
|
||||
*
|
||||
@@ -80,9 +80,9 @@ import org.springframework.util.StringUtils;
|
||||
*
|
||||
* <p>The central element is the {@link javax.annotation.Resource} annotation
|
||||
* for annotation-driven injection of named beans, by default from the containing
|
||||
* Spring BeanFactory, with only <code>mappedName</code> references resolved in JNDI.
|
||||
* Spring BeanFactory, with only {@code mappedName} references resolved in JNDI.
|
||||
* The {@link #setAlwaysUseJndiLookup "alwaysUseJndiLookup" flag} enforces JNDI lookups
|
||||
* equivalent to standard Java EE 5 resource injection for <code>name</code> references
|
||||
* equivalent to standard Java EE 5 resource injection for {@code name} references
|
||||
* and default names as well. The target beans can be simple POJOs, with no special
|
||||
* requirements other than the type having to match.
|
||||
*
|
||||
@@ -116,9 +116,9 @@ import org.springframework.util.StringUtils;
|
||||
* <property name="alwaysUseJndiLookup" value="true"/>
|
||||
* </bean></pre>
|
||||
*
|
||||
* <code>mappedName</code> references will always be resolved in JNDI,
|
||||
* {@code mappedName} references will always be resolved in JNDI,
|
||||
* allowing for global JNDI names (including "java:" prefix) as well. The
|
||||
* "alwaysUseJndiLookup" flag just affects <code>name</code> references and
|
||||
* "alwaysUseJndiLookup" flag just affects {@code name} references and
|
||||
* default names (inferred from the field name / property name).
|
||||
*
|
||||
* <p><b>NOTE:</b> A default CommonAnnotationBeanPostProcessor will be registered
|
||||
@@ -196,9 +196,9 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
|
||||
|
||||
|
||||
/**
|
||||
* Ignore the given resource type when resolving <code>@Resource</code>
|
||||
* Ignore the given resource type when resolving {@code @Resource}
|
||||
* annotations.
|
||||
* <p>By default, the <code>javax.xml.ws.WebServiceContext</code> interface
|
||||
* <p>By default, the {@code javax.xml.ws.WebServiceContext} interface
|
||||
* will be ignored, since it will be resolved by the JAX-WS runtime.
|
||||
* @param resourceType the resource type to ignore
|
||||
*/
|
||||
@@ -223,11 +223,11 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
|
||||
|
||||
/**
|
||||
* Set whether to always use JNDI lookups equivalent to standard Java EE 5 resource
|
||||
* injection, <b>even for <code>name</code> attributes and default names</b>.
|
||||
* injection, <b>even for {@code name} attributes and default names</b>.
|
||||
* <p>Default is "false": Resource names are used for Spring bean lookups in the
|
||||
* containing BeanFactory; only <code>mappedName</code> attributes point directly
|
||||
* containing BeanFactory; only {@code mappedName} attributes point directly
|
||||
* into JNDI. Switch this flag to "true" for enforcing Java EE style JNDI lookups
|
||||
* in any case, even for <code>name</code> attributes and default names.
|
||||
* in any case, even for {@code name} attributes and default names.
|
||||
* @see #setJndiFactory
|
||||
* @see #setResourceFactory
|
||||
*/
|
||||
@@ -236,11 +236,11 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify the factory for objects to be injected into <code>@Resource</code> /
|
||||
* <code>@WebServiceRef</code> / <code>@EJB</code> annotated fields and setter methods,
|
||||
* <b>for <code>mappedName</code> attributes that point directly into JNDI</b>.
|
||||
* Specify the factory for objects to be injected into {@code @Resource} /
|
||||
* {@code @WebServiceRef} / {@code @EJB} annotated fields and setter methods,
|
||||
* <b>for {@code mappedName} attributes that point directly into JNDI</b>.
|
||||
* This factory will also be used if "alwaysUseJndiLookup" is set to "true" in order
|
||||
* to enforce JNDI lookups even for <code>name</code> attributes and default names.
|
||||
* to enforce JNDI lookups even for {@code name} attributes and default names.
|
||||
* <p>The default is a {@link org.springframework.jndi.support.SimpleJndiBeanFactory}
|
||||
* for JNDI lookup behavior equivalent to standard Java EE 5 resource injection.
|
||||
* @see #setResourceFactory
|
||||
@@ -252,15 +252,15 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify the factory for objects to be injected into <code>@Resource</code> /
|
||||
* <code>@WebServiceRef</code> / <code>@EJB</code> annotated fields and setter methods,
|
||||
* <b>for <code>name</code> attributes and default names</b>.
|
||||
* Specify the factory for objects to be injected into {@code @Resource} /
|
||||
* {@code @WebServiceRef} / {@code @EJB} annotated fields and setter methods,
|
||||
* <b>for {@code name} attributes and default names</b>.
|
||||
* <p>The default is the BeanFactory that this post-processor is defined in,
|
||||
* if any, looking up resource names as Spring bean names. Specify the resource
|
||||
* factory explicitly for programmatic usage of this post-processor.
|
||||
* <p>Specifying Spring's {@link org.springframework.jndi.support.SimpleJndiBeanFactory}
|
||||
* leads to JNDI lookup behavior equivalent to standard Java EE 5 resource injection,
|
||||
* even for <code>name</code> attributes and default names. This is the same behavior
|
||||
* even for {@code name} attributes and default names. This is the same behavior
|
||||
* that the "alwaysUseJndiLookup" flag enables.
|
||||
* @see #setAlwaysUseJndiLookup
|
||||
*/
|
||||
@@ -399,7 +399,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
|
||||
* Obtain the resource object for the given name and type.
|
||||
* @param element the descriptor for the annotated field/method
|
||||
* @param requestingBeanName the name of the requesting bean
|
||||
* @return the resource object (never <code>null</code>)
|
||||
* @return the resource object (never {@code null})
|
||||
* @throws BeansException if we failed to obtain the target resource
|
||||
*/
|
||||
protected Object getResource(LookupElement element, String requestingBeanName) throws BeansException {
|
||||
@@ -422,7 +422,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
|
||||
* @param factory the factory to autowire against
|
||||
* @param element the descriptor for the annotated field/method
|
||||
* @param requestingBeanName the name of the requesting bean
|
||||
* @return the resource object (never <code>null</code>)
|
||||
* @return the resource object (never {@code null})
|
||||
* @throws BeansException if we failed to obtain the target resource
|
||||
*/
|
||||
protected Object autowireResource(BeanFactory factory, LookupElement element, String requestingBeanName)
|
||||
|
||||
@@ -29,15 +29,15 @@ public interface ScopeMetadataResolver {
|
||||
|
||||
/**
|
||||
* Resolve the {@link ScopeMetadata} appropriate to the supplied
|
||||
* bean <code>definition</code>.
|
||||
* bean {@code definition}.
|
||||
* <p>Implementations can of course use any strategy they like to
|
||||
* determine the scope metadata, but some implementations that spring
|
||||
* immediately to mind might be to use source level annotations
|
||||
* present on {@link BeanDefinition#getBeanClassName() the class} of the
|
||||
* supplied <code>definition</code>, or to use metadata present in the
|
||||
* {@link BeanDefinition#attributeNames()} of the supplied <code>definition</code>.
|
||||
* supplied {@code definition}, or to use metadata present in the
|
||||
* {@link BeanDefinition#attributeNames()} of the supplied {@code definition}.
|
||||
* @param definition the target bean definition
|
||||
* @return the relevant scope metadata; never <code>null</code>
|
||||
* @return the relevant scope metadata; never {@code null}
|
||||
*/
|
||||
ScopeMetadata resolveScopeMetadata(BeanDefinition definition);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.context.annotation.ComponentScanBeanDefinitionParser;
|
||||
|
||||
/**
|
||||
* {@link org.springframework.beans.factory.xml.NamespaceHandler}
|
||||
* for the '<code>context</code>' namespace.
|
||||
* for the '{@code context}' namespace.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Juergen Hoeller
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
|
||||
/**
|
||||
* Base class for events raised for an <code>ApplicationContext</code>.
|
||||
* Base class for events raised for an {@code ApplicationContext}.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 2.5
|
||||
@@ -29,15 +29,15 @@ public abstract class ApplicationContextEvent extends ApplicationEvent {
|
||||
|
||||
/**
|
||||
* Create a new ContextStartedEvent.
|
||||
* @param source the <code>ApplicationContext</code> that the event is raised for
|
||||
* (must not be <code>null</code>)
|
||||
* @param source the {@code ApplicationContext} that the event is raised for
|
||||
* (must not be {@code null})
|
||||
*/
|
||||
public ApplicationContextEvent(ApplicationContext source) {
|
||||
super(source);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the <code>ApplicationContext</code> that the event was raised for.
|
||||
* Get the {@code ApplicationContext} that the event was raised for.
|
||||
*/
|
||||
public final ApplicationContext getApplicationContext() {
|
||||
return (ApplicationContext) getSource();
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.context.event;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
/**
|
||||
* Event raised when an <code>ApplicationContext</code> gets closed.
|
||||
* Event raised when an {@code ApplicationContext} gets closed.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 12.08.2003
|
||||
@@ -29,8 +29,8 @@ public class ContextClosedEvent extends ApplicationContextEvent {
|
||||
|
||||
/**
|
||||
* Creates a new ContextClosedEvent.
|
||||
* @param source the <code>ApplicationContext</code> that has been closed
|
||||
* (must not be <code>null</code>)
|
||||
* @param source the {@code ApplicationContext} that has been closed
|
||||
* (must not be {@code null})
|
||||
*/
|
||||
public ContextClosedEvent(ApplicationContext source) {
|
||||
super(source);
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.context.event;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
/**
|
||||
* Event raised when an <code>ApplicationContext</code> gets initialized or refreshed.
|
||||
* Event raised when an {@code ApplicationContext} gets initialized or refreshed.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 04.03.2003
|
||||
@@ -29,8 +29,8 @@ public class ContextRefreshedEvent extends ApplicationContextEvent {
|
||||
|
||||
/**
|
||||
* Create a new ContextRefreshedEvent.
|
||||
* @param source the <code>ApplicationContext</code> that has been initialized
|
||||
* or refreshed (must not be <code>null</code>)
|
||||
* @param source the {@code ApplicationContext} that has been initialized
|
||||
* or refreshed (must not be {@code null})
|
||||
*/
|
||||
public ContextRefreshedEvent(ApplicationContext source) {
|
||||
super(source);
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.context.event;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
/**
|
||||
* Event raised when an <code>ApplicationContext</code> gets started.
|
||||
* Event raised when an {@code ApplicationContext} gets started.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Juergen Hoeller
|
||||
@@ -30,8 +30,8 @@ public class ContextStartedEvent extends ApplicationContextEvent {
|
||||
|
||||
/**
|
||||
* Create a new ContextStartedEvent.
|
||||
* @param source the <code>ApplicationContext</code> that has been started
|
||||
* (must not be <code>null</code>)
|
||||
* @param source the {@code ApplicationContext} that has been started
|
||||
* (must not be {@code null})
|
||||
*/
|
||||
public ContextStartedEvent(ApplicationContext source) {
|
||||
super(source);
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.context.event;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
/**
|
||||
* Event raised when an <code>ApplicationContext</code> gets stopped.
|
||||
* Event raised when an {@code ApplicationContext} gets stopped.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Juergen Hoeller
|
||||
@@ -30,8 +30,8 @@ public class ContextStoppedEvent extends ApplicationContextEvent {
|
||||
|
||||
/**
|
||||
* Create a new ContextStoppedEvent.
|
||||
* @param source the <code>ApplicationContext</code> that has been stopped
|
||||
* (must not be <code>null</code>)
|
||||
* @param source the {@code ApplicationContext} that has been stopped
|
||||
* (must not be {@code null})
|
||||
*/
|
||||
public ContextStoppedEvent(ApplicationContext source) {
|
||||
super(source);
|
||||
|
||||
@@ -28,8 +28,8 @@ import org.springframework.context.ApplicationEventPublisherAware;
|
||||
|
||||
/**
|
||||
* {@link MethodInterceptor Interceptor} that publishes an
|
||||
* <code>ApplicationEvent</code> to all <code>ApplicationListeners</code>
|
||||
* registered with an <code>ApplicationEventPublisher</code> after each
|
||||
* {@code ApplicationEvent} to all {@code ApplicationListeners}
|
||||
* registered with an {@code ApplicationEventPublisher} after each
|
||||
* <i>successful</i> method invocation.
|
||||
*
|
||||
* <p>Note that this interceptor is only capable of publishing <i>stateless</i>
|
||||
@@ -56,11 +56,11 @@ public class EventPublicationInterceptor
|
||||
/**
|
||||
* Set the application event class to publish.
|
||||
* <p>The event class <b>must</b> have a constructor with a single
|
||||
* <code>Object</code> argument for the event source. The interceptor
|
||||
* {@code Object} argument for the event source. The interceptor
|
||||
* will pass in the invoked object.
|
||||
* @throws IllegalArgumentException if the supplied <code>Class</code> is
|
||||
* <code>null</code> or if it is not an <code>ApplicationEvent</code> subclass or
|
||||
* if it does not expose a constructor that takes a single <code>Object</code> argument
|
||||
* @throws IllegalArgumentException if the supplied {@code Class} is
|
||||
* {@code null} or if it is not an {@code ApplicationEvent} subclass or
|
||||
* if it does not expose a constructor that takes a single {@code Object} argument
|
||||
*/
|
||||
public void setApplicationEventClass(Class applicationEventClass) {
|
||||
if (ApplicationEvent.class.equals(applicationEventClass) ||
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.context.ApplicationListener;
|
||||
*
|
||||
* <p>Multicasts all events to all registered listeners, leaving it up to
|
||||
* the listeners to ignore events that they are not interested in.
|
||||
* Listeners will usually perform corresponding <code>instanceof</code>
|
||||
* Listeners will usually perform corresponding {@code instanceof}
|
||||
* checks on the passed-in event object.
|
||||
*
|
||||
* <p>By default, all listeners are invoked in the calling thread.
|
||||
|
||||
@@ -63,7 +63,7 @@ public class MapAccessor implements PropertyAccessor {
|
||||
|
||||
|
||||
/**
|
||||
* Exception thrown from <code>read</code> in order to reset a cached
|
||||
* Exception thrown from {@code read} in order to reset a cached
|
||||
* PropertyAccessor, allowing other accessors to have a try.
|
||||
*/
|
||||
private static class MapAccessException extends AccessException {
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.core.NamedThreadLocal;
|
||||
* Simple holder class that associates a LocaleContext instance
|
||||
* with the current thread. The LocaleContext will be inherited
|
||||
* by any child threads spawned by the current thread if the
|
||||
* <code>inheritable<code> flag is set to <code>true</code>.
|
||||
* {@code inheritable} flag is set to {@code true}.
|
||||
*
|
||||
* <p>Used as a central holder for the current Locale in Spring,
|
||||
* wherever necessary: for example, in MessageSourceAccessor.
|
||||
@@ -68,9 +68,9 @@ public abstract class LocaleContextHolder {
|
||||
/**
|
||||
* Associate the given LocaleContext with the current thread.
|
||||
* @param localeContext the current LocaleContext,
|
||||
* or <code>null</code> to reset the thread-bound context
|
||||
* or {@code null} to reset the thread-bound context
|
||||
* @param inheritable whether to expose the LocaleContext as inheritable
|
||||
* for child threads (using an {@link java.lang.InheritableThreadLocal})
|
||||
* for child threads (using an {@link InheritableThreadLocal})
|
||||
*/
|
||||
public static void setLocaleContext(LocaleContext localeContext, boolean inheritable) {
|
||||
if (localeContext == null) {
|
||||
@@ -90,7 +90,7 @@ public abstract class LocaleContextHolder {
|
||||
|
||||
/**
|
||||
* Return the LocaleContext associated with the current thread, if any.
|
||||
* @return the current LocaleContext, or <code>null</code> if none
|
||||
* @return the current LocaleContext, or {@code null} if none
|
||||
*/
|
||||
public static LocaleContext getLocaleContext() {
|
||||
LocaleContext localeContext = localeContextHolder.get();
|
||||
@@ -104,7 +104,7 @@ public abstract class LocaleContextHolder {
|
||||
* Associate the given Locale with the current thread.
|
||||
* <p>Will implicitly create a LocaleContext for the given Locale,
|
||||
* <i>not</i> exposing it as inheritable for child threads.
|
||||
* @param locale the current Locale, or <code>null</code> to reset
|
||||
* @param locale the current Locale, or {@code null} to reset
|
||||
* the thread-bound context
|
||||
* @see SimpleLocaleContext#SimpleLocaleContext(java.util.Locale)
|
||||
*/
|
||||
@@ -115,10 +115,10 @@ public abstract class LocaleContextHolder {
|
||||
/**
|
||||
* Associate the given Locale with the current thread.
|
||||
* <p>Will implicitly create a LocaleContext for the given Locale.
|
||||
* @param locale the current Locale, or <code>null</code> to reset
|
||||
* @param locale the current Locale, or {@code null} to reset
|
||||
* the thread-bound context
|
||||
* @param inheritable whether to expose the LocaleContext as inheritable
|
||||
* for child threads (using an {@link java.lang.InheritableThreadLocal})
|
||||
* for child threads (using an {@link InheritableThreadLocal})
|
||||
* @see SimpleLocaleContext#SimpleLocaleContext(java.util.Locale)
|
||||
*/
|
||||
public static void setLocale(Locale locale, boolean inheritable) {
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Simple implementation of the {@link LocaleContext} interface,
|
||||
* always returning a specified <code>Locale</code>.
|
||||
* always returning a specified {@code Locale}.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.2
|
||||
@@ -34,7 +34,7 @@ public class SimpleLocaleContext implements LocaleContext {
|
||||
|
||||
/**
|
||||
* Create a new SimpleLocaleContext that exposes the specified Locale.
|
||||
* Every <code>getLocale()</code> will return this Locale.
|
||||
* Every {@code getLocale()} will return this Locale.
|
||||
* @param locale the Locale to expose
|
||||
*/
|
||||
public SimpleLocaleContext(Locale locale) {
|
||||
|
||||
@@ -264,14 +264,14 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
||||
|
||||
/**
|
||||
* Return a friendly name for this context.
|
||||
* @return a display name for this context (never <code>null</code>)
|
||||
* @return a display name for this context (never {@code null})
|
||||
*/
|
||||
public String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the parent context, or <code>null</code> if there is no parent
|
||||
* Return the parent context, or {@code null} if there is no parent
|
||||
* (that is, this context is the root of the context hierarchy).
|
||||
*/
|
||||
public ApplicationContext getParent() {
|
||||
@@ -339,7 +339,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
||||
|
||||
/**
|
||||
* Return the internal ApplicationEventMulticaster used by the context.
|
||||
* @return the internal ApplicationEventMulticaster (never <code>null</code>)
|
||||
* @return the internal ApplicationEventMulticaster (never {@code null})
|
||||
* @throws IllegalStateException if the context has not been initialized yet
|
||||
*/
|
||||
private ApplicationEventMulticaster getApplicationEventMulticaster() throws IllegalStateException {
|
||||
@@ -352,7 +352,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
||||
|
||||
/**
|
||||
* Return the internal LifecycleProcessor used by the context.
|
||||
* @return the internal LifecycleProcessor (never <code>null</code>)
|
||||
* @return the internal LifecycleProcessor (never {@code null})
|
||||
* @throws IllegalStateException if the context has not been initialized yet
|
||||
*/
|
||||
private LifecycleProcessor getLifecycleProcessor() {
|
||||
@@ -371,7 +371,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
||||
* <p>Can be overridden in subclasses, for extended resolution strategies,
|
||||
* for example in a web environment.
|
||||
* <p><b>Do not call this when needing to resolve a location pattern.</b>
|
||||
* Call the context's <code>getResources</code> method instead, which
|
||||
* Call the context's {@code getResources} method instead, which
|
||||
* will delegate to the ResourcePatternResolver.
|
||||
* @return the ResourcePatternResolver for this context
|
||||
* @see #getResources
|
||||
@@ -952,7 +952,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel this context's refresh attempt, resetting the <code>active</code> flag
|
||||
* Cancel this context's refresh attempt, resetting the {@code active} flag
|
||||
* after an exception got thrown.
|
||||
* @param ex the exception that led to the cancellation
|
||||
*/
|
||||
@@ -966,8 +966,8 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
||||
/**
|
||||
* Register a shutdown hook with the JVM runtime, closing this context
|
||||
* on JVM shutdown unless it has already been closed at that time.
|
||||
* <p>Delegates to <code>doClose()</code> for the actual closing procedure.
|
||||
* @see java.lang.Runtime#addShutdownHook
|
||||
* <p>Delegates to {@code doClose()} for the actual closing procedure.
|
||||
* @see Runtime#addShutdownHook
|
||||
* @see #close()
|
||||
* @see #doClose()
|
||||
*/
|
||||
@@ -989,7 +989,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
||||
* Only called when the ApplicationContext itself is running
|
||||
* as a bean in another BeanFactory or ApplicationContext,
|
||||
* which is rather unusual.
|
||||
* <p>The <code>close</code> method is the native way to
|
||||
* <p>The {@code close} method is the native way to
|
||||
* shut down an ApplicationContext.
|
||||
* @see #close()
|
||||
* @see org.springframework.beans.factory.access.SingletonBeanFactoryLocator
|
||||
@@ -1000,7 +1000,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
||||
|
||||
/**
|
||||
* Close this application context, destroying all beans in its bean factory.
|
||||
* <p>Delegates to <code>doClose()</code> for the actual closing procedure.
|
||||
* <p>Delegates to {@code doClose()} for the actual closing procedure.
|
||||
* Also removes a JVM shutdown hook, if registered, as it's not needed anymore.
|
||||
* @see #doClose()
|
||||
* @see #registerShutdownHook()
|
||||
@@ -1024,7 +1024,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
||||
/**
|
||||
* Actually performs context closing: publishes a ContextClosedEvent and
|
||||
* destroys the singletons in the bean factory of this application context.
|
||||
* <p>Called by both <code>close()</code> and a JVM shutdown hook, if any.
|
||||
* <p>Called by both {@code close()} and a JVM shutdown hook, if any.
|
||||
* @see org.springframework.context.event.ContextClosedEvent
|
||||
* @see #destroyBeans()
|
||||
* @see #close()
|
||||
@@ -1078,7 +1078,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
||||
/**
|
||||
* Template method for destroying all beans that this context manages.
|
||||
* The default implementation destroy all cached singletons in this context,
|
||||
* invoking <code>DisposableBean.destroy()</code> and/or the specified
|
||||
* invoking {@code DisposableBean.destroy()} and/or the specified
|
||||
* "destroy-method".
|
||||
* <p>Can be overridden to add context-specific bean destruction steps
|
||||
* right before or right after standard singleton destruction,
|
||||
@@ -1240,7 +1240,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
||||
|
||||
/**
|
||||
* Return the internal MessageSource used by the context.
|
||||
* @return the internal MessageSource (never <code>null</code>)
|
||||
* @return the internal MessageSource (never {@code null})
|
||||
* @throws IllegalStateException if the context has not been initialized yet
|
||||
*/
|
||||
private MessageSource getMessageSource() throws IllegalStateException {
|
||||
@@ -1318,7 +1318,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
||||
* <p>Note: Subclasses should check whether the context is still active before
|
||||
* returning the internal bean factory. The internal factory should generally be
|
||||
* considered unavailable once the context has been closed.
|
||||
* @return this application context's internal bean factory (never <code>null</code>)
|
||||
* @return this application context's internal bean factory (never {@code null})
|
||||
* @throws IllegalStateException if the context does not hold an internal bean factory yet
|
||||
* (usually if {@link #refresh()} has never been called) or if the context has been
|
||||
* closed already
|
||||
|
||||
@@ -164,13 +164,13 @@ public abstract class AbstractMessageSource extends MessageSourceSupport impleme
|
||||
|
||||
/**
|
||||
* Resolve the given code and arguments as message in the given Locale,
|
||||
* returning <code>null</code> if not found. Does <i>not</i> fall back to
|
||||
* the code as default message. Invoked by <code>getMessage</code> methods.
|
||||
* returning {@code null} if not found. Does <i>not</i> fall back to
|
||||
* the code as default message. Invoked by {@code getMessage} methods.
|
||||
* @param code the code to lookup up, such as 'calculator.noRateSet'
|
||||
* @param args array of arguments that will be filled in for params
|
||||
* within the message
|
||||
* @param locale the Locale in which to do the lookup
|
||||
* @return the resolved message, or <code>null</code> if not found
|
||||
* @return the resolved message, or {@code null} if not found
|
||||
* @see #getMessage(String, Object[], String, Locale)
|
||||
* @see #getMessage(String, Object[], Locale)
|
||||
* @see #getMessage(MessageSourceResolvable, Locale)
|
||||
@@ -220,7 +220,7 @@ public abstract class AbstractMessageSource extends MessageSourceSupport impleme
|
||||
* @param args array of arguments that will be filled in for params
|
||||
* within the message
|
||||
* @param locale the Locale in which to do the lookup
|
||||
* @return the resolved message, or <code>null</code> if not found
|
||||
* @return the resolved message, or {@code null} if not found
|
||||
* @see #getParentMessageSource()
|
||||
*/
|
||||
protected String getMessageFromParent(String code, Object[] args, Locale locale) {
|
||||
@@ -244,10 +244,10 @@ public abstract class AbstractMessageSource extends MessageSourceSupport impleme
|
||||
* Return a fallback default message for the given code, if any.
|
||||
* <p>Default is to return the code itself if "useCodeAsDefaultMessage" is activated,
|
||||
* or return no fallback else. In case of no fallback, the caller will usually
|
||||
* receive a NoSuchMessageException from <code>getMessage</code>.
|
||||
* receive a NoSuchMessageException from {@code getMessage}.
|
||||
* @param code the message code that we couldn't resolve
|
||||
* and that we didn't receive an explicit default message for
|
||||
* @return the default message to use, or <code>null</code> if none
|
||||
* @return the default message to use, or {@code null} if none
|
||||
* @see #setUseCodeAsDefaultMessage
|
||||
*/
|
||||
protected String getDefaultMessage(String code) {
|
||||
@@ -289,14 +289,14 @@ public abstract class AbstractMessageSource extends MessageSourceSupport impleme
|
||||
* <p>The default implementation <i>does</i> use MessageFormat, through
|
||||
* delegating to the {@link #resolveCode} method. Subclasses are encouraged
|
||||
* to replace this with optimized resolution.
|
||||
* <p>Unfortunately, <code>java.text.MessageFormat</code> is not implemented
|
||||
* <p>Unfortunately, {@code java.text.MessageFormat} is not implemented
|
||||
* in an efficient fashion. In particular, it does not detect that a message
|
||||
* pattern doesn't contain argument placeholders in the first place. Therefore,
|
||||
* it is advisable to circumvent MessageFormat for messages without arguments.
|
||||
* @param code the code of the message to resolve
|
||||
* @param locale the Locale to resolve the code for
|
||||
* (subclasses are encouraged to support internationalization)
|
||||
* @return the message String, or <code>null</code> if not found
|
||||
* @return the message String, or {@code null} if not found
|
||||
* @see #resolveCode
|
||||
* @see java.text.MessageFormat
|
||||
*/
|
||||
@@ -320,7 +320,7 @@ public abstract class AbstractMessageSource extends MessageSourceSupport impleme
|
||||
* @param code the code of the message to resolve
|
||||
* @param locale the Locale to resolve the code for
|
||||
* (subclasses are encouraged to support internationalization)
|
||||
* @return the MessageFormat for the message, or <code>null</code> if not found
|
||||
* @return the MessageFormat for the message, or {@code null} if not found
|
||||
* @see #resolveCodeWithoutArguments(String, java.util.Locale)
|
||||
*/
|
||||
protected abstract MessageFormat resolveCode(String code, Locale locale);
|
||||
|
||||
@@ -90,9 +90,9 @@ public abstract class AbstractRefreshableConfigApplicationContext extends Abstra
|
||||
* Return an array of resource locations, referring to the XML bean definition
|
||||
* files that this context should be built with. Can also include location
|
||||
* patterns, which will get resolved via a ResourcePatternResolver.
|
||||
* <p>The default implementation returns <code>null</code>. Subclasses can override
|
||||
* <p>The default implementation returns {@code null}. Subclasses can override
|
||||
* this to provide a set of resource locations to load bean definitions from.
|
||||
* @return an array of resource locations, or <code>null</code> if none
|
||||
* @return an array of resource locations, or {@code null} if none
|
||||
* @see #getResources
|
||||
* @see #getResourcePatternResolver
|
||||
*/
|
||||
@@ -103,7 +103,7 @@ public abstract class AbstractRefreshableConfigApplicationContext extends Abstra
|
||||
/**
|
||||
* Return the default config locations to use, for the case where no
|
||||
* explicit config locations have been specified.
|
||||
* <p>The default implementation returns <code>null</code>,
|
||||
* <p>The default implementation returns {@code null},
|
||||
* requiring explicit config locations.
|
||||
* @return an array of default config locations, if any
|
||||
* @see #setConfigLocations
|
||||
|
||||
@@ -63,7 +63,7 @@ public abstract class AbstractXmlApplicationContext extends AbstractRefreshableC
|
||||
|
||||
|
||||
/**
|
||||
* Set whether to use XML validation. Default is <code>true</code>.
|
||||
* Set whether to use XML validation. Default is {@code true}.
|
||||
*/
|
||||
public void setValidating(boolean validating) {
|
||||
this.validating = validating;
|
||||
@@ -131,9 +131,9 @@ public abstract class AbstractXmlApplicationContext extends AbstractRefreshableC
|
||||
/**
|
||||
* Return an array of Resource objects, referring to the XML bean definition
|
||||
* files that this context should be built with.
|
||||
* <p>The default implementation returns <code>null</code>. Subclasses can override
|
||||
* <p>The default implementation returns {@code null}. Subclasses can override
|
||||
* this to provide pre-built Resource objects rather than location Strings.
|
||||
* @return an array of Resource objects, or <code>null</code> if none
|
||||
* @return an array of Resource objects, or {@code null} if none
|
||||
* @see #getConfigLocations()
|
||||
*/
|
||||
protected Resource[] getConfigResources() {
|
||||
|
||||
@@ -95,7 +95,7 @@ public abstract class ApplicationObjectSupport implements ApplicationContextAwar
|
||||
|
||||
/**
|
||||
* Determine the context class that any context passed to
|
||||
* <code>setApplicationContext</code> must be an instance of.
|
||||
* {@code setApplicationContext} must be an instance of.
|
||||
* Can be overridden in subclasses.
|
||||
* @see #setApplicationContext
|
||||
*/
|
||||
@@ -105,7 +105,7 @@ public abstract class ApplicationObjectSupport implements ApplicationContextAwar
|
||||
|
||||
/**
|
||||
* Subclasses can override this for custom initialization behavior.
|
||||
* Gets called by <code>setApplicationContext</code> after setting the context instance.
|
||||
* Gets called by {@code setApplicationContext} after setting the context instance.
|
||||
* <p>Note: Does </i>not</i> get called on reinitialization of the context
|
||||
* but rather just on first initialization of this object's context reference.
|
||||
* <p>The default implementation calls the overloaded {@link #initApplicationContext()}
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.springframework.util.ReflectionUtils;
|
||||
/**
|
||||
* Special variant of an overriding ClassLoader, used for temporary type
|
||||
* matching in {@link AbstractApplicationContext}. Redefines classes from
|
||||
* a cached byte array for every <code>loadClass</code> call in order to
|
||||
* a cached byte array for every {@code loadClass} call in order to
|
||||
* pick up recently loaded types in the parent ClassLoader.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
|
||||
@@ -131,7 +131,7 @@ public class DefaultMessageSourceResolvable implements MessageSourceResolvable,
|
||||
/**
|
||||
* Default implementation exposes the attributes of this MessageSourceResolvable.
|
||||
* To be overridden in more specific subclasses, potentially including the
|
||||
* resolvable content through <code>resolvableToString()</code>.
|
||||
* resolvable content through {@code resolvableToString()}.
|
||||
* @see #resolvableToString()
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -178,7 +178,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem
|
||||
|
||||
/**
|
||||
* Set a ResourceLoader to use for this context. If set, the context will
|
||||
* delegate all <code>getResource</code> calls to the given ResourceLoader.
|
||||
* delegate all {@code getResource} calls to the given ResourceLoader.
|
||||
* If not set, default resource loading will apply.
|
||||
* <p>The main reason to specify a custom ResourceLoader is to resolve
|
||||
* resource paths (without URL prefix) in a specific fashion.
|
||||
@@ -186,7 +186,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem
|
||||
* To resolve resource paths as file system locations, specify a
|
||||
* FileSystemResourceLoader here.
|
||||
* <p>You can also pass in a full ResourcePatternResolver, which will
|
||||
* be autodetected by the context and used for <code>getResources</code>
|
||||
* be autodetected by the context and used for {@code getResources}
|
||||
* calls as well. Else, default resource pattern matching will apply.
|
||||
* @see #getResource
|
||||
* @see org.springframework.core.io.DefaultResourceLoader
|
||||
|
||||
@@ -84,7 +84,7 @@ public class GenericXmlApplicationContext extends GenericApplicationContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether to use XML validation. Default is <code>true</code>.
|
||||
* Set whether to use XML validation. Default is {@code true}.
|
||||
*/
|
||||
public void setValidating(boolean validating) {
|
||||
this.reader.setValidating(validating);
|
||||
|
||||
@@ -97,7 +97,7 @@ public class MessageSourceAccessor {
|
||||
/**
|
||||
* Retrieve the message for the given code and the default Locale.
|
||||
* @param code code of the message
|
||||
* @param args arguments for the message, or <code>null</code> if none
|
||||
* @param args arguments for the message, or {@code null} if none
|
||||
* @param defaultMessage String to return if the lookup fails
|
||||
* @return the message
|
||||
*/
|
||||
@@ -108,7 +108,7 @@ public class MessageSourceAccessor {
|
||||
/**
|
||||
* Retrieve the message for the given code and the given Locale.
|
||||
* @param code code of the message
|
||||
* @param args arguments for the message, or <code>null</code> if none
|
||||
* @param args arguments for the message, or {@code null} if none
|
||||
* @param defaultMessage String to return if the lookup fails
|
||||
* @param locale Locale in which to do lookup
|
||||
* @return the message
|
||||
@@ -141,7 +141,7 @@ public class MessageSourceAccessor {
|
||||
/**
|
||||
* Retrieve the message for the given code and the default Locale.
|
||||
* @param code code of the message
|
||||
* @param args arguments for the message, or <code>null</code> if none
|
||||
* @param args arguments for the message, or {@code null} if none
|
||||
* @return the message
|
||||
* @throws org.springframework.context.NoSuchMessageException if not found
|
||||
*/
|
||||
@@ -152,7 +152,7 @@ public class MessageSourceAccessor {
|
||||
/**
|
||||
* Retrieve the message for the given code and the given Locale.
|
||||
* @param code code of the message
|
||||
* @param args arguments for the message, or <code>null</code> if none
|
||||
* @param args arguments for the message, or {@code null} if none
|
||||
* @param locale Locale in which to do lookup
|
||||
* @return the message
|
||||
* @throws org.springframework.context.NoSuchMessageException if not found
|
||||
|
||||
@@ -67,7 +67,7 @@ public class MessageSourceResourceBundle extends ResourceBundle {
|
||||
|
||||
/**
|
||||
* This implementation resolves the code in the MessageSource.
|
||||
* Returns <code>null</code> if the message could not be resolved.
|
||||
* Returns {@code null} if the message could not be resolved.
|
||||
*/
|
||||
@Override
|
||||
protected Object handleGetObject(String code) {
|
||||
@@ -80,7 +80,7 @@ public class MessageSourceResourceBundle extends ResourceBundle {
|
||||
}
|
||||
|
||||
/**
|
||||
* This implementation returns <code>null</code>, as a MessageSource does
|
||||
* This implementation returns {@code null}, as a MessageSource does
|
||||
* not allow for enumerating the defined message codes.
|
||||
*/
|
||||
@Override
|
||||
@@ -90,7 +90,7 @@ public class MessageSourceResourceBundle extends ResourceBundle {
|
||||
|
||||
/**
|
||||
* This implementation exposes the specified Locale for introspection
|
||||
* through the standard <code>ResourceBundle.getLocale()</code> method.
|
||||
* through the standard {@code ResourceBundle.getLocale()} method.
|
||||
*/
|
||||
@Override
|
||||
public Locale getLocale() {
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.springframework.util.ObjectUtils;
|
||||
* methods defined in the {@link org.springframework.context.MessageSource}.
|
||||
*
|
||||
* <p>{@link AbstractMessageSource} derives from this class, providing concrete
|
||||
* <code>getMessage</code> implementations that delegate to a central template
|
||||
* {@code getMessage} implementations that delegate to a central template
|
||||
* method for message code resolution.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
@@ -87,12 +87,12 @@ public abstract class MessageSourceSupport {
|
||||
* Render the given default message String. The default message is
|
||||
* passed in as specified by the caller and can be rendered into
|
||||
* a fully formatted default message shown to the user.
|
||||
* <p>The default implementation passes the String to <code>formatMessage</code>,
|
||||
* <p>The default implementation passes the String to {@code formatMessage},
|
||||
* resolving any argument placeholders found in them. Subclasses may override
|
||||
* this method to plug in custom processing of default messages.
|
||||
* @param defaultMessage the passed-in default message String
|
||||
* @param args array of arguments that will be filled in for params within
|
||||
* the message, or <code>null</code> if none.
|
||||
* the message, or {@code null} if none.
|
||||
* @param locale the Locale used for formatting
|
||||
* @return the rendered default message (with resolved arguments)
|
||||
* @see #formatMessage(String, Object[], java.util.Locale)
|
||||
@@ -107,7 +107,7 @@ public abstract class MessageSourceSupport {
|
||||
* any argument placeholders found in them.
|
||||
* @param msg the message to format
|
||||
* @param args array of arguments that will be filled in for params within
|
||||
* the message, or <code>null</code> if none
|
||||
* the message, or {@code null} if none
|
||||
* @param locale the Locale used for formatting
|
||||
* @return the formatted message (with resolved arguments)
|
||||
*/
|
||||
|
||||
@@ -174,7 +174,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractMessageSource
|
||||
/**
|
||||
* Set the default charset to use for parsing properties files.
|
||||
* Used if no file-specific charset is specified for a file.
|
||||
* <p>Default is none, using the <code>java.util.Properties</code>
|
||||
* <p>Default is none, using the {@code java.util.Properties}
|
||||
* default encoding: ISO-8859-1.
|
||||
* <p>Only applies to classic properties files, not to XML files.
|
||||
* @param defaultEncoding the default charset
|
||||
@@ -205,7 +205,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractMessageSource
|
||||
* fallback will be the default file (e.g. "messages.properties" for
|
||||
* basename "messages").
|
||||
* <p>Falling back to the system Locale is the default behavior of
|
||||
* <code>java.util.ResourceBundle</code>. However, this is often not desirable
|
||||
* {@code java.util.ResourceBundle}. However, this is often not desirable
|
||||
* in an application server environment, where the system Locale is not relevant
|
||||
* to the application at all: Set this flag to "false" in such a scenario.
|
||||
*/
|
||||
@@ -217,7 +217,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractMessageSource
|
||||
* Set the number of seconds to cache loaded properties files.
|
||||
* <ul>
|
||||
* <li>Default is "-1", indicating to cache forever (just like
|
||||
* <code>java.util.ResourceBundle</code>).
|
||||
* {@code java.util.ResourceBundle}).
|
||||
* <li>A positive number will cache loaded properties files for the given
|
||||
* number of seconds. This is essentially the interval between refresh checks.
|
||||
* Note that a refresh attempt will first check the last-modified timestamp
|
||||
@@ -445,7 +445,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractMessageSource
|
||||
|
||||
/**
|
||||
* Refresh the PropertiesHolder for the given bundle filename.
|
||||
* The holder can be <code>null</code> if not cached before, or a timed-out cache entry
|
||||
* The holder can be {@code null} if not cached before, or a timed-out cache entry
|
||||
* (potentially getting re-validated against the current last-modified timestamp).
|
||||
* @param filename the bundle filename (basename + Locale)
|
||||
* @param propHolder the current PropertiesHolder for the bundle
|
||||
|
||||
@@ -49,9 +49,9 @@ import org.springframework.util.StringUtils;
|
||||
* the generated MessageFormats for each message. It also implements rendering of
|
||||
* no-arg messages without MessageFormat, as supported by the AbstractMessageSource
|
||||
* base class. The caching provided by this MessageSource is significantly faster
|
||||
* than the built-in caching of the <code>java.util.ResourceBundle</code> class.
|
||||
* than the built-in caching of the {@code java.util.ResourceBundle} class.
|
||||
*
|
||||
* <p>Unfortunately, <code>java.util.ResourceBundle</code> caches loaded bundles
|
||||
* <p>Unfortunately, {@code java.util.ResourceBundle} caches loaded bundles
|
||||
* forever: Reloading a bundle during VM execution is <i>not</i> possible.
|
||||
* As this MessageSource relies on ResourceBundle, it faces the same limitation.
|
||||
* Consider {@link ReloadableResourceBundleMessageSource} for an alternative
|
||||
@@ -103,7 +103,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
|
||||
/**
|
||||
* Set a single basename, following {@link java.util.ResourceBundle} conventions:
|
||||
* essentially, a fully-qualified classpath location. If it doesn't contain a
|
||||
* package qualifier (such as <code>org.mypackage</code>), it will be resolved
|
||||
* package qualifier (such as {@code org.mypackage}), it will be resolved
|
||||
* from the classpath root.
|
||||
* <p>Messages will normally be held in the "/lib" or "/classes" directory of
|
||||
* a web application's WAR structure. They can also be held in jar files on
|
||||
@@ -111,7 +111,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
|
||||
* <p>Note that ResourceBundle names are effectively classpath locations: As a
|
||||
* consequence, the JDK's standard ResourceBundle treats dots as package separators.
|
||||
* This means that "test.theme" is effectively equivalent to "test/theme",
|
||||
* just like it is for programmatic <code>java.util.ResourceBundle</code> usage.
|
||||
* just like it is for programmatic {@code java.util.ResourceBundle} usage.
|
||||
* @see #setBasenames
|
||||
* @see java.util.ResourceBundle#getBundle(String)
|
||||
*/
|
||||
@@ -122,7 +122,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
|
||||
/**
|
||||
* Set an array of basenames, each following {@link java.util.ResourceBundle}
|
||||
* conventions: essentially, a fully-qualified classpath location. If it
|
||||
* doesn't contain a package qualifier (such as <code>org.mypackage</code>),
|
||||
* doesn't contain a package qualifier (such as {@code org.mypackage}),
|
||||
* it will be resolved from the classpath root.
|
||||
* <p>The associated resource bundles will be checked sequentially
|
||||
* when resolving a message code. Note that message definitions in a
|
||||
@@ -131,7 +131,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
|
||||
* <p>Note that ResourceBundle names are effectively classpath locations: As a
|
||||
* consequence, the JDK's standard ResourceBundle treats dots as package separators.
|
||||
* This means that "test.theme" is effectively equivalent to "test/theme",
|
||||
* just like it is for programmatic <code>java.util.ResourceBundle</code> usage.
|
||||
* just like it is for programmatic {@code java.util.ResourceBundle} usage.
|
||||
* @see #setBasename
|
||||
* @see java.util.ResourceBundle#getBundle(String)
|
||||
*/
|
||||
@@ -151,7 +151,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
|
||||
|
||||
/**
|
||||
* Set the default charset to use for parsing resource bundle files.
|
||||
* <p>Default is none, using the <code>java.util.ResourceBundle</code>
|
||||
* <p>Default is none, using the {@code java.util.ResourceBundle}
|
||||
* default encoding: ISO-8859-1.
|
||||
* <p><b>NOTE: Only works on JDK 1.6 and higher.</b> Consider using
|
||||
* {@link ReloadableResourceBundleMessageSource} for JDK 1.5 support
|
||||
@@ -167,7 +167,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
|
||||
* fallback will be the default file (e.g. "messages.properties" for
|
||||
* basename "messages").
|
||||
* <p>Falling back to the system Locale is the default behavior of
|
||||
* <code>java.util.ResourceBundle</code>. However, this is often not desirable
|
||||
* {@code java.util.ResourceBundle}. However, this is often not desirable
|
||||
* in an application server environment, where the system Locale is not relevant
|
||||
* to the application at all: Set this flag to "false" in such a scenario.
|
||||
* <p><b>NOTE: Only works on JDK 1.6 and higher.</b> Consider using
|
||||
@@ -266,7 +266,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
|
||||
* fetching already generated MessageFormats from the cache.
|
||||
* @param basename the basename of the ResourceBundle
|
||||
* @param locale the Locale to find the ResourceBundle for
|
||||
* @return the resulting ResourceBundle, or <code>null</code> if none
|
||||
* @return the resulting ResourceBundle, or {@code null} if none
|
||||
* found for the given basename and Locale
|
||||
*/
|
||||
protected ResourceBundle getResourceBundle(String basename, Locale locale) {
|
||||
@@ -338,7 +338,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
|
||||
* @param bundle the ResourceBundle to work on
|
||||
* @param code the message code to retrieve
|
||||
* @param locale the Locale to use to build the MessageFormat
|
||||
* @return the resulting MessageFormat, or <code>null</code> if no message
|
||||
* @return the resulting MessageFormat, or {@code null} if no message
|
||||
* defined for the given code
|
||||
* @throws MissingResourceException if thrown by the ResourceBundle
|
||||
*/
|
||||
@@ -413,7 +413,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
|
||||
|
||||
|
||||
/**
|
||||
* Custom implementation of Java 6's <code>ResourceBundle.Control</code>,
|
||||
* Custom implementation of Java 6's {@code ResourceBundle.Control},
|
||||
* adding support for custom file encodings, deactivating the fallback to the
|
||||
* system locale and activating ResourceBundle's native cache, if desired.
|
||||
*/
|
||||
|
||||
@@ -29,11 +29,11 @@ import org.springframework.core.NamedThreadLocal;
|
||||
/**
|
||||
* Thread-backed {@link Scope} implementation.
|
||||
*
|
||||
* <p><strong>Note</strong> that the <code>SimpleThreadScope</code> <em>does not clean up any objects</em> associated
|
||||
* <p><strong>Note</strong> that the {@code SimpleThreadScope} <em>does not clean up any objects</em> associated
|
||||
* with it. As such, it's typically preferable to use the {@link org.springframework.web.context.request.RequestScope}
|
||||
* in Web environments.
|
||||
*
|
||||
* <p>For a implementation of a thread-based <code>Scope</code> with support for destruction callbacks, refer to <a
|
||||
* <p>For a implementation of a thread-based {@code Scope} with support for destruction callbacks, refer to <a
|
||||
* href="http://www.springbyexample.org/twiki/bin/view/Example/CustomThreadScopeModule">this module</a>.
|
||||
*
|
||||
* <p>Thanks to Eugene Kuleshov for submitting the original prototype for a thread scope!
|
||||
|
||||
@@ -35,11 +35,11 @@ import org.springframework.instrument.classloading.websphere.WebSphereLoadTimeWe
|
||||
|
||||
/**
|
||||
* Default {@link LoadTimeWeaver} bean for use in an application context,
|
||||
* decorating an automatically detected internal <code>LoadTimeWeaver</code>.
|
||||
* decorating an automatically detected internal {@code LoadTimeWeaver}.
|
||||
*
|
||||
* <p>Typically registered for the default bean name
|
||||
* "<code>loadTimeWeaver</code>"; the most convenient way to achieve this is
|
||||
* Spring's <code><context:load-time-weaver></code> XML tag.
|
||||
* "{@code loadTimeWeaver}"; the most convenient way to achieve this is
|
||||
* Spring's {@code <context:load-time-weaver>} XML tag.
|
||||
*
|
||||
* <p>This class implements a runtime environment check for obtaining
|
||||
* the appropriate weaver implementation: As of Spring 3.1, it detects
|
||||
|
||||
@@ -41,10 +41,10 @@ public interface LoadTimeWeaverAware extends Aware {
|
||||
* {@link org.springframework.context.ApplicationContextAware ApplicationContextAware's}
|
||||
* {@link org.springframework.context.ApplicationContextAware#setApplicationContext setApplicationContext(..)}.
|
||||
* <p><b>NOTE:</b> This method will only be called if there actually is a
|
||||
* <code>LoadTimeWeaver</code> available in the application context. If
|
||||
* {@code LoadTimeWeaver} available in the application context. If
|
||||
* there is none, the method will simply not get invoked, assuming that the
|
||||
* implementing object is able to activate its weaving dependency accordingly.
|
||||
* @param loadTimeWeaver the <code>LoadTimeWeaver</code> instance (never <code>null</code>)
|
||||
* @param loadTimeWeaver the {@code LoadTimeWeaver} instance (never {@code null})
|
||||
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet
|
||||
* @see org.springframework.context.ApplicationContextAware#setApplicationContext
|
||||
*/
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* <p>{@link org.springframework.context.ApplicationContext Application contexts}
|
||||
* will automatically register this with their underlying {@link BeanFactory bean factory},
|
||||
* provided that a default <code>LoadTimeWeaver</code> is actually available.
|
||||
* provided that a default {@code LoadTimeWeaver} is actually available.
|
||||
*
|
||||
* <p>Applications should not use this class directly.
|
||||
*
|
||||
@@ -48,7 +48,7 @@ public class LoadTimeWeaverAwareProcessor implements BeanPostProcessor, BeanFact
|
||||
|
||||
|
||||
/**
|
||||
* Create a new <code>LoadTimeWeaverAwareProcessor</code> that will
|
||||
* Create a new {@code LoadTimeWeaverAwareProcessor} that will
|
||||
* auto-retrieve the {@link LoadTimeWeaver} from the containing
|
||||
* {@link BeanFactory}, expecting a bean named
|
||||
* {@link ConfigurableApplicationContext#LOAD_TIME_WEAVER_BEAN_NAME "loadTimeWeaver"}.
|
||||
@@ -57,21 +57,21 @@ public class LoadTimeWeaverAwareProcessor implements BeanPostProcessor, BeanFact
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new <code>LoadTimeWeaverAwareProcessor</code> for the given
|
||||
* Create a new {@code LoadTimeWeaverAwareProcessor} for the given
|
||||
* {@link LoadTimeWeaver}.
|
||||
* <p>If the given <code>loadTimeWeaver</code> is <code>null</code>, then a
|
||||
* <code>LoadTimeWeaver</code> will be auto-retrieved from the containing
|
||||
* <p>If the given {@code loadTimeWeaver} is {@code null}, then a
|
||||
* {@code LoadTimeWeaver} will be auto-retrieved from the containing
|
||||
* {@link BeanFactory}, expecting a bean named
|
||||
* {@link ConfigurableApplicationContext#LOAD_TIME_WEAVER_BEAN_NAME "loadTimeWeaver"}.
|
||||
* @param loadTimeWeaver the specific <code>LoadTimeWeaver</code> that is to be used
|
||||
* @param loadTimeWeaver the specific {@code LoadTimeWeaver} that is to be used
|
||||
*/
|
||||
public LoadTimeWeaverAwareProcessor(LoadTimeWeaver loadTimeWeaver) {
|
||||
this.loadTimeWeaver = loadTimeWeaver;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new <code>LoadTimeWeaverAwareProcessor</code>.
|
||||
* <p>The <code>LoadTimeWeaver</code> will be auto-retrieved from
|
||||
* Create a new {@code LoadTimeWeaverAwareProcessor}.
|
||||
* <p>The {@code LoadTimeWeaver} will be auto-retrieved from
|
||||
* the given {@link BeanFactory}, expecting a bean named
|
||||
* {@link ConfigurableApplicationContext#LOAD_TIME_WEAVER_BEAN_NAME "loadTimeWeaver"}.
|
||||
* @param beanFactory the BeanFactory to retrieve the LoadTimeWeaver from
|
||||
|
||||
@@ -53,10 +53,10 @@ public abstract class AbstractRemoteSlsbInvokerInterceptor extends AbstractSlsbI
|
||||
|
||||
/**
|
||||
* Set a home interface that this invoker will narrow to before performing
|
||||
* the parameterless SLSB <code>create()</code> call that returns the actual
|
||||
* the parameterless SLSB {@code create()} call that returns the actual
|
||||
* SLSB proxy.
|
||||
* <p>Default is none, which will work on all J2EE servers that are not based
|
||||
* on CORBA. A plain <code>javax.ejb.EJBHome</code> interface is known to be
|
||||
* on CORBA. A plain {@code javax.ejb.EJBHome} interface is known to be
|
||||
* sufficient to make a WebSphere 5.0 Remote SLSB work. On other servers,
|
||||
* the specific home interface for the target SLSB might be necessary.
|
||||
*/
|
||||
@@ -128,7 +128,7 @@ public abstract class AbstractRemoteSlsbInvokerInterceptor extends AbstractSlsbI
|
||||
|
||||
|
||||
/**
|
||||
* Fetches an EJB home object and delegates to <code>doInvoke</code>.
|
||||
* Fetches an EJB home object and delegates to {@code doInvoke}.
|
||||
* <p>If configured to refresh on connect failure, it will call
|
||||
* {@link #refreshAndRetry} on corresponding RMI exceptions.
|
||||
* @see #getHome
|
||||
|
||||
@@ -205,7 +205,7 @@ public abstract class AbstractSlsbInvokerInterceptor extends JndiObjectLocator
|
||||
|
||||
|
||||
/**
|
||||
* Invokes the <code>create()</code> method on the cached EJB home object.
|
||||
* Invokes the {@code create()} method on the cached EJB home object.
|
||||
* @return a new EJBObject or EJBLocalObject
|
||||
* @throws NamingException if thrown by JNDI
|
||||
* @throws InvocationTargetException if thrown by the create method
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
|
||||
|
||||
/**
|
||||
* {@link org.springframework.beans.factory.xml.NamespaceHandler}
|
||||
* for the '<code>jee</code>' namespace.
|
||||
* for the '{@code jee}' namespace.
|
||||
*
|
||||
* @author Rob Harrop
|
||||
* @since 2.0
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Simple {@link org.springframework.beans.factory.xml.BeanDefinitionParser} implementation that
|
||||
* translates <code>jndi-lookup</code> tag into {@link JndiObjectFactoryBean} definitions.
|
||||
* translates {@code jndi-lookup} tag into {@link JndiObjectFactoryBean} definitions.
|
||||
*
|
||||
* @author Rob Harrop
|
||||
* @author Juergen Hoeller
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean;
|
||||
|
||||
/**
|
||||
* {@link org.springframework.beans.factory.xml.BeanDefinitionParser}
|
||||
* implementation for parsing '<code>local-slsb</code>' tags and
|
||||
* implementation for parsing '{@code local-slsb}' tags and
|
||||
* creating {@link LocalStatelessSessionProxyFactoryBean} definitions.
|
||||
*
|
||||
* @author Rob Harrop
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBe
|
||||
|
||||
/**
|
||||
* {@link org.springframework.beans.factory.xml.BeanDefinitionParser}
|
||||
* implementation for parsing '<code>remote-slsb</code>' tags and
|
||||
* implementation for parsing '{@code remote-slsb}' tags and
|
||||
* creating {@link SimpleRemoteStatelessSessionProxyFactoryBean} definitions.
|
||||
*
|
||||
* @author Rob Harrop
|
||||
|
||||
@@ -34,13 +34,13 @@ import org.springframework.context.access.ContextSingletonBeanFactoryLocator;
|
||||
|
||||
/**
|
||||
* EJB3-compliant interceptor class that injects Spring beans into
|
||||
* fields and methods which are annotated with <code>@Autowired</code>.
|
||||
* fields and methods which are annotated with {@code @Autowired}.
|
||||
* Performs injection after construction as well as after activation
|
||||
* of a passivated bean.
|
||||
*
|
||||
* <p>To be applied through an <code>@Interceptors</code> annotation in
|
||||
* <p>To be applied through an {@code @Interceptors} annotation in
|
||||
* the EJB Session Bean or Message-Driven Bean class, or through an
|
||||
* <code>interceptor-binding</code> XML element in the EJB deployment descriptor.
|
||||
* {@code interceptor-binding} XML element in the EJB deployment descriptor.
|
||||
*
|
||||
* <p>Delegates to Spring's {@link AutowiredAnnotationBeanPostProcessor}
|
||||
* underneath, allowing for customization of its specific settings through
|
||||
@@ -60,7 +60,7 @@ import org.springframework.context.access.ContextSingletonBeanFactoryLocator;
|
||||
*
|
||||
* <p><b>WARNING: Do not define the same bean as Spring-managed bean and as
|
||||
* EJB3 session bean in the same deployment unit.</b> In particular, be
|
||||
* careful when using the <code><context:component-scan></code> feature
|
||||
* careful when using the {@code <context:component-scan>} feature
|
||||
* in combination with the deployment of Spring-based EJB3 session beans:
|
||||
* Make sure that the EJB3 session beans are <i>not</i> autodetected as
|
||||
* Spring-managed beans as well, using appropriate package restrictions.
|
||||
@@ -130,7 +130,7 @@ public class SpringBeanAutowiringInterceptor {
|
||||
/**
|
||||
* Determine the BeanFactory for autowiring the given target bean.
|
||||
* @param target the target bean to autowire
|
||||
* @return the BeanFactory to use (never <code>null</code>)
|
||||
* @return the BeanFactory to use (never {@code null})
|
||||
* @see #getBeanFactoryReference
|
||||
*/
|
||||
protected BeanFactory getBeanFactory(Object target) {
|
||||
@@ -146,7 +146,7 @@ public class SpringBeanAutowiringInterceptor {
|
||||
* <p>The default implementation delegates to {@link #getBeanFactoryLocator}
|
||||
* and {@link #getBeanFactoryLocatorKey}.
|
||||
* @param target the target bean to autowire
|
||||
* @return the BeanFactoryReference to use (never <code>null</code>)
|
||||
* @return the BeanFactoryReference to use (never {@code null})
|
||||
* @see #getBeanFactoryLocator
|
||||
* @see #getBeanFactoryLocatorKey
|
||||
* @see org.springframework.beans.factory.access.BeanFactoryLocator#useBeanFactory(String)
|
||||
@@ -163,7 +163,7 @@ public class SpringBeanAutowiringInterceptor {
|
||||
* <p>The default implementation exposes Spring's default
|
||||
* {@link ContextSingletonBeanFactoryLocator}.
|
||||
* @param target the target bean to autowire
|
||||
* @return the BeanFactoryLocator to use (never <code>null</code>)
|
||||
* @return the BeanFactoryLocator to use (never {@code null})
|
||||
* @see org.springframework.context.access.ContextSingletonBeanFactoryLocator#getInstance()
|
||||
*/
|
||||
protected BeanFactoryLocator getBeanFactoryLocator(Object target) {
|
||||
@@ -174,11 +174,11 @@ public class SpringBeanAutowiringInterceptor {
|
||||
* Determine the BeanFactoryLocator key to use. This typically indicates
|
||||
* the bean name of the ApplicationContext definition in
|
||||
* <strong>classpath*:beanRefContext.xml</strong> resource files.
|
||||
* <p>The default is <code>null</code>, indicating the single
|
||||
* <p>The default is {@code null}, indicating the single
|
||||
* ApplicationContext defined in the locator. This must be overridden
|
||||
* if more than one shared ApplicationContext definition is available.
|
||||
* @param target the target bean to autowire
|
||||
* @return the BeanFactoryLocator key to use (or <code>null</code> for
|
||||
* @return the BeanFactoryLocator key to use (or {@code null} for
|
||||
* referring to the single ApplicationContext defined in the locator)
|
||||
*/
|
||||
protected String getBeanFactoryLocatorKey(Object target) {
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
|
||||
/**
|
||||
*
|
||||
* Support classes for EJB 3 Session Beans and Message-Driven Beans,
|
||||
* performing injection of Spring beans through an EJB 3 interceptor
|
||||
* that processes Spring's <code>@Autowired</code> annotation.
|
||||
* that processes Spring's {@code @Autowired} annotation.
|
||||
*
|
||||
*/
|
||||
package org.springframework.ejb.interceptor;
|
||||
|
||||
@@ -35,15 +35,15 @@ import org.springframework.util.WeakReferenceMonitor;
|
||||
* facade, with the business logic deferred to beans in the BeanFactory. Default
|
||||
* is to use a {@link org.springframework.context.access.ContextJndiBeanFactoryLocator},
|
||||
* which will initialize an XML ApplicationContext from the class path (based on a JNDI
|
||||
* name specified). For a different locator strategy, <code>setBeanFactoryLocator</code>
|
||||
* may be called (<i>before</i> your EJB's <code>ejbCreate</code> method is invoked,
|
||||
* e.g. in <code>setSessionContext</code>). For use of a shared ApplicationContext between
|
||||
* name specified). For a different locator strategy, {@code setBeanFactoryLocator}
|
||||
* may be called (<i>before</i> your EJB's {@code ejbCreate} method is invoked,
|
||||
* e.g. in {@code setSessionContext}). For use of a shared ApplicationContext between
|
||||
* multiple EJBs, where the container class loader setup supports this visibility, you may
|
||||
* instead use a {@link org.springframework.context.access.ContextSingletonBeanFactoryLocator}.
|
||||
* Alternatively, {@link #setBeanFactoryLocator} may be called with a custom implementation
|
||||
* of the {@link org.springframework.beans.factory.access.BeanFactoryLocator} interface.
|
||||
*
|
||||
* <p>Note that we cannot use <code>final</code> for our implementation of EJB lifecycle
|
||||
* <p>Note that we cannot use {@code final} for our implementation of EJB lifecycle
|
||||
* methods, as this would violate the EJB specification.
|
||||
*
|
||||
* @author Rod Johnson
|
||||
@@ -77,10 +77,10 @@ public abstract class AbstractEnterpriseBean implements EnterpriseBean {
|
||||
* ContextJndiBeanFactoryLocator.
|
||||
* <p>Can be invoked before loadBeanFactory, for example in constructor or
|
||||
* setSessionContext if you want to override the default locator.
|
||||
* <p>Note that the BeanFactory is automatically loaded by the <code>ejbCreate</code>
|
||||
* <p>Note that the BeanFactory is automatically loaded by the {@code ejbCreate}
|
||||
* implementations of AbstractStatelessSessionBean and
|
||||
* AbstractMessageDriverBean but needs to be explicitly loaded in custom
|
||||
* AbstractStatefulSessionBean <code>ejbCreate</code> methods.
|
||||
* AbstractStatefulSessionBean {@code ejbCreate} methods.
|
||||
* @see AbstractStatelessSessionBean#ejbCreate
|
||||
* @see AbstractMessageDrivenBean#ejbCreate
|
||||
* @see AbstractStatefulSessionBean#loadBeanFactory
|
||||
@@ -96,7 +96,7 @@ public abstract class AbstractEnterpriseBean implements EnterpriseBean {
|
||||
* ContextJndiBeanFactoryLocator, this is the JNDI path. The default value
|
||||
* of this property is "java:comp/env/ejb/BeanFactoryPath".
|
||||
* <p>Can be invoked before {@link #loadBeanFactory}, for example in the constructor
|
||||
* or <code>setSessionContext</code> if you want to override the default locator key.
|
||||
* or {@code setSessionContext} if you want to override the default locator key.
|
||||
* @see #BEAN_FACTORY_PATH_ENVIRONMENT_KEY
|
||||
*/
|
||||
public void setBeanFactoryLocatorKey(String factoryKey) {
|
||||
@@ -127,7 +127,7 @@ public abstract class AbstractEnterpriseBean implements EnterpriseBean {
|
||||
|
||||
/**
|
||||
* Unload the Spring BeanFactory instance. The default {@link #ejbRemove()}
|
||||
* method invokes this method, but subclasses which override <code>ejbRemove()</code>
|
||||
* method invokes this method, but subclasses which override {@code ejbRemove()}
|
||||
* must invoke this method themselves.
|
||||
* <p>Package-visible as it shouldn't be called directly by user-created
|
||||
* subclasses.
|
||||
@@ -142,7 +142,7 @@ public abstract class AbstractEnterpriseBean implements EnterpriseBean {
|
||||
}
|
||||
|
||||
/**
|
||||
* May be called after <code>ejbCreate()</code>.
|
||||
* May be called after {@code ejbCreate()}.
|
||||
* @return the bean factory
|
||||
*/
|
||||
protected BeanFactory getBeanFactory() {
|
||||
@@ -150,7 +150,7 @@ public abstract class AbstractEnterpriseBean implements EnterpriseBean {
|
||||
}
|
||||
|
||||
/**
|
||||
* EJB lifecycle method, implemented to invoke <code>onEjbRemove()</code>
|
||||
* EJB lifecycle method, implemented to invoke {@code onEjbRemove()}
|
||||
* and unload the BeanFactory afterwards.
|
||||
* <p>Don't override it (although it can't be made final): code your shutdown
|
||||
* in {@link #onEjbRemove()}.
|
||||
@@ -162,11 +162,11 @@ public abstract class AbstractEnterpriseBean implements EnterpriseBean {
|
||||
|
||||
/**
|
||||
* Subclasses must implement this method to do any initialization they would
|
||||
* otherwise have done in an <code>ejbRemove()</code> method.
|
||||
* otherwise have done in an {@code ejbRemove()} method.
|
||||
* The BeanFactory will be unloaded afterwards.
|
||||
* <p>This implementation is empty, to be overridden in subclasses.
|
||||
* The same restrictions apply to the work of this method as to an
|
||||
* <code>ejbRemove()<code> method.
|
||||
* {@code ejbRemove()} method.
|
||||
*/
|
||||
protected void onEjbRemove() {
|
||||
// empty
|
||||
|
||||
@@ -20,7 +20,7 @@ import javax.jms.MessageListener;
|
||||
|
||||
/**
|
||||
* Convenient base class for JMS-based EJB 2.x MDBs. Requires subclasses
|
||||
* to implement the JMS <code>javax.jms.MessageListener</code> interface.
|
||||
* to implement the JMS {@code javax.jms.MessageListener} interface.
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @deprecated as of Spring 3.2, in favor of implementing EJBs in EJB 3 style
|
||||
@@ -29,6 +29,6 @@ import javax.jms.MessageListener;
|
||||
public abstract class AbstractJmsMessageDrivenBean extends AbstractMessageDrivenBean implements MessageListener {
|
||||
|
||||
// Empty: The purpose of this class is to ensure
|
||||
// that subclasses implement <code>javax.jms.MessageListener</code>.
|
||||
// that subclasses implement {@code javax.jms.MessageListener}.
|
||||
|
||||
}
|
||||
|
||||
@@ -29,15 +29,15 @@ import org.apache.commons.logging.LogFactory;
|
||||
*
|
||||
* <p>This class ensures that subclasses have access to the
|
||||
* MessageDrivenContext provided by the EJB container, and implement
|
||||
* a no-arg <code>ejbCreate()</code> method as required by the EJB
|
||||
* specification. This <code>ejbCreate()</code> method loads a BeanFactory,
|
||||
* before invoking the <code>onEjbCreate()</code> method, which is
|
||||
* a no-arg {@code ejbCreate()} method as required by the EJB
|
||||
* specification. This {@code ejbCreate()} method loads a BeanFactory,
|
||||
* before invoking the {@code onEjbCreate()} method, which is
|
||||
* supposed to contain subclass-specific initialization.
|
||||
*
|
||||
* <p>NB: We cannot use final methods to implement EJB API methods,
|
||||
* as this violates the EJB specification. However, there should be
|
||||
* no need to override the <code>setMessageDrivenContext</code> or
|
||||
* <code>ejbCreate()</code> methods.
|
||||
* no need to override the {@code setMessageDrivenContext} or
|
||||
* {@code ejbCreate()} methods.
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @deprecated as of Spring 3.2, in favor of implementing EJBs in EJB 3 style
|
||||
@@ -83,10 +83,10 @@ public abstract class AbstractMessageDrivenBean extends AbstractEnterpriseBean
|
||||
|
||||
/**
|
||||
* Subclasses must implement this method to do any initialization they would
|
||||
* otherwise have done in an <code>ejbCreate()</code> method. In contrast
|
||||
* to <code>ejbCreate()</code>, the BeanFactory will have been loaded here.
|
||||
* otherwise have done in an {@code ejbCreate()} method. In contrast
|
||||
* to {@code ejbCreate()}, the BeanFactory will have been loaded here.
|
||||
* <p>The same restrictions apply to the work of this method as
|
||||
* to an <code>ejbCreate()</code> method.
|
||||
* to an {@code ejbCreate()} method.
|
||||
*/
|
||||
protected abstract void onEjbCreate();
|
||||
|
||||
|
||||
@@ -22,20 +22,20 @@ import org.springframework.beans.FatalBeanException;
|
||||
/**
|
||||
* Convenient base class for EJB 2.x stateful session beans (SFSBs).
|
||||
* SFSBs should extend this class, leaving them to implement the
|
||||
* <code>ejbActivate()</code> and <code>ejbPassivate()</code> lifecycle
|
||||
* {@code ejbActivate()} and {@code ejbPassivate()} lifecycle
|
||||
* methods to comply with the requirements of the EJB specification.
|
||||
*
|
||||
* <p><b>Note: Subclasses should invoke the <code>loadBeanFactory()</code>
|
||||
* method in their custom <code>ejbCreate()</code> and <code>ejbActivate()</code>
|
||||
* methods, and should invoke the <code>unloadBeanFactory()</code> method in
|
||||
* their <code>ejbPassivate</code> method.</b>
|
||||
* <p><b>Note: Subclasses should invoke the {@code loadBeanFactory()}
|
||||
* method in their custom {@code ejbCreate()} and {@code ejbActivate()}
|
||||
* methods, and should invoke the {@code unloadBeanFactory()} method in
|
||||
* their {@code ejbPassivate} method.</b>
|
||||
*
|
||||
* <p><b>Note: The default BeanFactoryLocator used by this class's superclass
|
||||
* (ContextJndiBeanFactoryLocator) is <b>not</b> serializable. Therefore,
|
||||
* when using the default BeanFactoryLocator, or another variant which is
|
||||
* not serializable, subclasses must call <code>setBeanFactoryLocator(null)</code>
|
||||
* in <code>ejbPassivate()</code>, with a corresponding call to
|
||||
* <code>setBeanFactoryLocator(xxx)</code> in <code>ejbActivate()</code>
|
||||
* not serializable, subclasses must call {@code setBeanFactoryLocator(null)}
|
||||
* in {@code ejbPassivate()}, with a corresponding call to
|
||||
* {@code setBeanFactoryLocator(xxx)} in {@code ejbActivate()}
|
||||
* unless relying on the default locator.
|
||||
*
|
||||
* @author Rod Johnson
|
||||
@@ -48,13 +48,13 @@ public abstract class AbstractStatefulSessionBean extends AbstractSessionBean {
|
||||
|
||||
/**
|
||||
* Load a Spring BeanFactory namespace. Exposed for subclasses
|
||||
* to load a BeanFactory in their <code>ejbCreate()</code> methods.
|
||||
* to load a BeanFactory in their {@code ejbCreate()} methods.
|
||||
* Those callers would normally want to catch BeansException and
|
||||
* rethrow it as {@link javax.ejb.CreateException}. Unless the
|
||||
* BeanFactory is known to be serializable, this method must also
|
||||
* be called from <code>ejbActivate()</code>, to reload a context
|
||||
* removed via a call to <code>unloadBeanFactory()</code> from
|
||||
* the <code>ejbPassivate()</code> implementation.
|
||||
* be called from {@code ejbActivate()}, to reload a context
|
||||
* removed via a call to {@code unloadBeanFactory()} from
|
||||
* the {@code ejbPassivate()} implementation.
|
||||
*/
|
||||
@Override
|
||||
protected void loadBeanFactory() throws BeansException {
|
||||
@@ -62,12 +62,12 @@ public abstract class AbstractStatefulSessionBean extends AbstractSessionBean {
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload the Spring BeanFactory instance. The default <code>ejbRemove()</code>
|
||||
* Unload the Spring BeanFactory instance. The default {@code ejbRemove()}
|
||||
* method invokes this method, but subclasses which override
|
||||
* <code>ejbRemove()</code> must invoke this method themselves.
|
||||
* {@code ejbRemove()} must invoke this method themselves.
|
||||
* <p>Unless the BeanFactory is known to be serializable, this method
|
||||
* must also be called from <code>ejbPassivate()</code>, with a corresponding
|
||||
* call to <code>loadBeanFactory()</code> from <code>ejbActivate()</code>.
|
||||
* must also be called from {@code ejbPassivate()}, with a corresponding
|
||||
* call to {@code loadBeanFactory()} from {@code ejbActivate()}.
|
||||
*/
|
||||
@Override
|
||||
protected void unloadBeanFactory() throws FatalBeanException {
|
||||
|
||||
@@ -32,15 +32,15 @@ import org.apache.commons.logging.LogFactory;
|
||||
* not be overriden by subclasses. (Unfortunately the EJB specification
|
||||
* forbids enforcing this by making EJB lifecycle methods final.)
|
||||
*
|
||||
* <p>There should be no need to override the <code>setSessionContext()</code>
|
||||
* or <code>ejbCreate()</code> lifecycle methods.
|
||||
* <p>There should be no need to override the {@code setSessionContext()}
|
||||
* or {@code ejbCreate()} lifecycle methods.
|
||||
*
|
||||
* <p>Subclasses are left to implement the <code>onEjbCreate()</code> method
|
||||
* <p>Subclasses are left to implement the {@code onEjbCreate()} method
|
||||
* to do whatever initialization they wish to do after their BeanFactory has
|
||||
* already been loaded, and is available from the <code>getBeanFactory()</code>
|
||||
* already been loaded, and is available from the {@code getBeanFactory()}
|
||||
* method.
|
||||
*
|
||||
* <p>This class provides the no-arg <code>ejbCreate()</code> method required
|
||||
* <p>This class provides the no-arg {@code ejbCreate()} method required
|
||||
* by the EJB specification, but not the SessionBean interface, eliminating
|
||||
* a common cause of EJB deployment failure.
|
||||
*
|
||||
@@ -71,10 +71,10 @@ public abstract class AbstractStatelessSessionBean extends AbstractSessionBean {
|
||||
|
||||
/**
|
||||
* Subclasses must implement this method to do any initialization
|
||||
* they would otherwise have done in an <code>ejbCreate()</code> method.
|
||||
* In contrast to <code>ejbCreate</code>, the BeanFactory will have been loaded here.
|
||||
* they would otherwise have done in an {@code ejbCreate()} method.
|
||||
* In contrast to {@code ejbCreate}, the BeanFactory will have been loaded here.
|
||||
* <p>The same restrictions apply to the work of this method as
|
||||
* to an <code>ejbCreate()</code> method.
|
||||
* to an {@code ejbCreate()} method.
|
||||
* @throws CreateException
|
||||
*/
|
||||
protected abstract void onEjbCreate() throws CreateException;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
*
|
||||
* <p>Base classes to make implementing EJB 2.x beans simpler and less error-prone,
|
||||
@@ -11,13 +10,13 @@
|
||||
* behind the BeanFactory as required.</p>
|
||||
*
|
||||
* <p>Note that the default behavior is to look for an EJB environment variable
|
||||
* with name <code>ejb/BeanFactoryPath</code> that specifies the
|
||||
* with name {@code ejb/BeanFactoryPath} that specifies the
|
||||
* location <i>on the classpath</i> of an XML bean factory definition
|
||||
* file (such as <code>/com/mycom/mypackage/mybeans.xml</code>).
|
||||
* file (such as {@code /com/mycom/mypackage/mybeans.xml}).
|
||||
* If this JNDI key is missing, your EJB subclass won't successfully
|
||||
* initialize in the container.</p>
|
||||
*
|
||||
* <p><b>Check out the <code>org.springframework.ejb.interceptor</code>
|
||||
* <p><b>Check out the {@code org.springframework.ejb.interceptor}
|
||||
* package for equivalent support for the EJB 3 component model</b>,
|
||||
* providing annotation-based autowiring using an EJB 3 interceptor.</p>
|
||||
*
|
||||
|
||||
@@ -21,8 +21,8 @@ import java.util.Set;
|
||||
/**
|
||||
* A factory that creates formatters to format values of fields annotated with a particular {@link Annotation}.
|
||||
*
|
||||
* <p>For example, a <code>DateTimeFormatAnnotationFormatterFactory</code> might create a formatter
|
||||
* that formats <code>Date</code> values set on fields annotated with <code>@DateTimeFormat</code>.
|
||||
* <p>For example, a {@code DateTimeFormatAnnotationFormatterFactory} might create a formatter
|
||||
* that formats {@code Date} values set on fields annotated with {@code @DateTimeFormat}.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
@@ -36,8 +36,8 @@ public interface AnnotationFormatterFactory<A extends Annotation> {
|
||||
Set<Class<?>> getFieldTypes();
|
||||
|
||||
/**
|
||||
* Get the Printer to print the value of a field of <code>fieldType</code> annotated with <code>annotation</code>.
|
||||
* If the type <T> the printer accepts is not assignable to <code>fieldType</code>, a coersion from <code>fieldType</code> to <T> will be attempted before the Printer is invoked.
|
||||
* Get the Printer to print the value of a field of {@code fieldType} annotated with {@code annotation}.
|
||||
* If the type <T> the printer accepts is not assignable to {@code fieldType}, a coersion from {@code fieldType} to <T> will be attempted before the Printer is invoked.
|
||||
* @param annotation the annotation instance
|
||||
* @param fieldType the type of field that was annotated
|
||||
* @return the printer
|
||||
@@ -45,8 +45,8 @@ public interface AnnotationFormatterFactory<A extends Annotation> {
|
||||
Printer<?> getPrinter(A annotation, Class<?> fieldType);
|
||||
|
||||
/**
|
||||
* Get the Parser to parse a submitted value for a field of <code>fieldType</code> annotated with <code>annotation</code>.
|
||||
* If the object the parser returns is not assignable to <code>fieldType</code>, a coersion to <code>fieldType</code> will be attempted before the field is set.
|
||||
* Get the Parser to parse a submitted value for a field of {@code fieldType} annotated with {@code annotation}.
|
||||
* If the object the parser returns is not assignable to {@code fieldType}, a coersion to {@code fieldType} will be attempted before the field is set.
|
||||
* @param annotation the annotation instance
|
||||
* @param fieldType the type of field that was annotated
|
||||
* @return the parser
|
||||
|
||||
@@ -40,9 +40,9 @@ public interface FormatterRegistry extends ConverterRegistry {
|
||||
|
||||
/**
|
||||
* Adds a Formatter to format fields of the given type.
|
||||
* <p>On print, if the Formatter's type T is declared and <code>fieldType</code> is not assignable to T,
|
||||
* a coersion to T will be attempted before delegating to <code>formatter</code> to print a field value.
|
||||
* On parse, if the parsed object returned by <code>formatter</code> is not assignable to the runtime field type,
|
||||
* <p>On print, if the Formatter's type T is declared and {@code fieldType} is not assignable to T,
|
||||
* a coersion to T will be attempted before delegating to {@code formatter} to print a field value.
|
||||
* On parse, if the parsed object returned by {@code formatter} is not assignable to the runtime field type,
|
||||
* a coersion to the field type will be attempted before returning the parsed field value.
|
||||
* @param fieldType the field type to format
|
||||
* @param formatter the formatter to add
|
||||
@@ -51,10 +51,10 @@ public interface FormatterRegistry extends ConverterRegistry {
|
||||
|
||||
/**
|
||||
* Adds a Printer/Parser pair to format fields of a specific type.
|
||||
* The formatter will delegate to the specified <code>printer</code> for printing
|
||||
* and the specified <code>parser</code> for parsing.
|
||||
* <p>On print, if the Printer's type T is declared and <code>fieldType</code> is not assignable to T,
|
||||
* a coersion to T will be attempted before delegating to <code>printer</code> to print a field value.
|
||||
* The formatter will delegate to the specified {@code printer} for printing
|
||||
* and the specified {@code parser} for parsing.
|
||||
* <p>On print, if the Printer's type T is declared and {@code fieldType} is not assignable to T,
|
||||
* a coersion to T will be attempted before delegating to {@code printer} to print a field value.
|
||||
* On parse, if the object returned by the Parser is not assignable to the runtime field type,
|
||||
* a coersion to the field type will be attempted before returning the parsed field value.
|
||||
* @param fieldType the field type to format
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.lang.annotation.Target;
|
||||
/**
|
||||
* Declares that a field should be formatted as a date time.
|
||||
* Supports formatting by style pattern, ISO date time pattern, or custom format pattern string.
|
||||
* Can be applied to <code>java.util.Date</code>, <code>java.util.Calendar</code>, <code>java.long.Long</code>, or Joda Time fields.
|
||||
* Can be applied to {@code java.util.Date}, {@code java.util.Calendar}, {@code java.long.Long}, or Joda Time fields.
|
||||
* <p>
|
||||
* For style-based formatting, set the {@link #style()} attribute to be the style pattern code.
|
||||
* The first character of the code is the date style, and the second character is the time style.
|
||||
@@ -32,8 +32,8 @@ import java.lang.annotation.Target;
|
||||
* A date or time may be omitted by specifying the style character '-'.
|
||||
* <p>
|
||||
* For ISO-based formatting, set the {@link #iso()} attribute to be the desired {@link ISO} format, such as {@link ISO#DATE}.
|
||||
<p>
|
||||
* For custom formatting, set the {@link #pattern()} attribute to be the DateTime pattern, such as <code>yyyy/MM/dd hh:mm:ss a</code>.
|
||||
<p>
|
||||
* For custom formatting, set the {@link #pattern()} attribute to be the DateTime pattern, such as {@code yyyy/MM/dd hh:mm:ss a}.
|
||||
* <p>
|
||||
* Each attribute is mutually exclusive, so only set one attribute per annotation instance (the one most convenient one for your formatting needs).
|
||||
* When the pattern attribute is specified, it takes precedence over both the style and ISO attribute.
|
||||
@@ -78,17 +78,17 @@ public @interface DateTimeFormat {
|
||||
public enum ISO {
|
||||
|
||||
/**
|
||||
* The most common ISO Date Format <code>yyyy-MM-dd</code> e.g. 2000-10-31.
|
||||
* The most common ISO Date Format {@code yyyy-MM-dd} e.g. 2000-10-31.
|
||||
*/
|
||||
DATE,
|
||||
|
||||
/**
|
||||
* The most common ISO Time Format <code>HH:mm:ss.SSSZ</code> e.g. 01:30:00.000-05:00.
|
||||
* The most common ISO Time Format {@code HH:mm:ss.SSSZ} e.g. 01:30:00.000-05:00.
|
||||
*/
|
||||
TIME,
|
||||
|
||||
/**
|
||||
* The most common ISO DateTime Format <code>yyyy-MM-dd'T'HH:mm:ss.SSSZ</code> e.g. 2000-10-31 01:30:00.000-05:00.
|
||||
* The most common ISO DateTime Format {@code yyyy-MM-dd'T'HH:mm:ss.SSSZ} e.g. 2000-10-31 01:30:00.000-05:00.
|
||||
* The default if no annotation value is specified.
|
||||
*/
|
||||
DATE_TIME,
|
||||
|
||||
@@ -24,10 +24,10 @@ import java.lang.annotation.Target;
|
||||
/**
|
||||
* Declares that a field should be formatted as a number.
|
||||
* Supports formatting by style or custom pattern string.
|
||||
* Can be applied to any JDK <code>java.lang.Number</code> type.
|
||||
* Can be applied to any JDK {@code java.lang.Number} type.
|
||||
* <p>
|
||||
* For style-based formatting, set the {@link #style()} attribute to be the desired {@link Style}.
|
||||
* For custom formatting, set the {@link #pattern()} attribute to be the number pattern, such as <code>#,###.##</code>.
|
||||
* For custom formatting, set the {@link #pattern()} attribute to be the number pattern, such as {@code #, ###.##}.
|
||||
* <p>
|
||||
* Each attribute is mutually exclusive, so only set one attribute per annotation instance (the one most convenient one for your formatting needs).
|
||||
* When the pattern attribute is specified, it takes precedence over the style attribute.
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.joda.time.format.DateTimeFormatter;
|
||||
|
||||
/**
|
||||
* A context that holds user-specific Joda Time settings such as the user's Chronology (calendar system) and time zone.
|
||||
* A <code>null</code> property value indicate the user has not specified a setting.
|
||||
* A {@code null} property value indicate the user has not specified a setting.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
@@ -67,7 +67,7 @@ public class JodaTimeContext {
|
||||
|
||||
|
||||
/**
|
||||
* Gets the Formatter with the this context's settings applied to the base <code>formatter</code>.
|
||||
* Gets the Formatter with the this context's settings applied to the base {@code formatter}.
|
||||
* @param formatter the base formatter that establishes default formatting rules, generally context independent
|
||||
* @return the context DateTimeFormatter
|
||||
*/
|
||||
|
||||
@@ -45,7 +45,7 @@ public final class JodaTimeContextHolder {
|
||||
/**
|
||||
* Associate the given JodaTimeContext with the current thread.
|
||||
* @param jodaTimeContext the current JodaTimeContext,
|
||||
* or <code>null</code> to reset the thread-bound context
|
||||
* or {@code null} to reset the thread-bound context
|
||||
*/
|
||||
public static void setJodaTimeContext(JodaTimeContext jodaTimeContext) {
|
||||
if (jodaTimeContext == null) {
|
||||
@@ -58,7 +58,7 @@ public final class JodaTimeContextHolder {
|
||||
|
||||
/**
|
||||
* Return the JodaTimeContext associated with the current thread, if any.
|
||||
* @return the current JodaTimeContext, or <code>null</code> if none
|
||||
* @return the current JodaTimeContext, or {@code null} if none
|
||||
*/
|
||||
public static JodaTimeContext getJodaTimeContext() {
|
||||
return jodaTimeContextHolder.get();
|
||||
@@ -69,7 +69,7 @@ public final class JodaTimeContextHolder {
|
||||
* Obtain a DateTimeFormatter with user-specific settings applied to the given base Formatter.
|
||||
* @param formatter the base formatter that establishes default formatting rules
|
||||
* (generally user independent)
|
||||
* @param locale the current user locale (may be <code>null</code> if not known)
|
||||
* @param locale the current user locale (may be {@code null} if not known)
|
||||
* @return the user-specific DateTimeFormatter
|
||||
*/
|
||||
public static DateTimeFormatter getFormatter(DateTimeFormatter formatter, Locale locale) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* Formatters for <code>java.util.Date</code> properties.
|
||||
* Formatters for {@code java.util.Date} properties.
|
||||
*/
|
||||
package org.springframework.format.datetime;
|
||||
|
||||
@@ -67,7 +67,7 @@ public abstract class AbstractNumberFormatter implements Formatter<Number> {
|
||||
/**
|
||||
* Obtain a concrete NumberFormat for the specified locale.
|
||||
* @param locale the current locale
|
||||
* @return the NumberFormat instance (never <code>null</code>)
|
||||
* @return the NumberFormat instance (never {@code null})
|
||||
*/
|
||||
protected abstract NumberFormat getNumberFormat(Locale locale);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* Formatters for <code>java.lang.Number</code> properties.
|
||||
* Formatters for {@code java.lang.Number} properties.
|
||||
*/
|
||||
package org.springframework.format.number;
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.springframework.util.StringValueResolver;
|
||||
* of registrars to use through {@link #setFormatterRegistrars(Set)}.
|
||||
*
|
||||
* <p>A good example for registering converters and formatters in code is
|
||||
* <code>JodaTimeFormatterRegistrar</code>, which registers a number of
|
||||
* {@code JodaTimeFormatterRegistrar}, which registers a number of
|
||||
* date-related formatters and converters. For a more detailed list of cases
|
||||
* see {@link #setFormatterRegistrars(Set)}
|
||||
*
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.util.ClassUtils;
|
||||
*
|
||||
* <p><code class="code">-javaagent:path/to/org.springframework.instrument.jar</code>
|
||||
*
|
||||
* <p>where <code>org.springframework.instrument.jar</code> is a JAR file containing
|
||||
* <p>where {@code org.springframework.instrument.jar} is a JAR file containing
|
||||
* the {@link InstrumentationSavingAgent} class, as shipped with Spring.
|
||||
*
|
||||
* <p>In Eclipse, for example, set the "Run configuration"'s JVM args to be of the form:
|
||||
@@ -133,7 +133,7 @@ public class InstrumentationLoadTimeWeaver implements LoadTimeWeaver {
|
||||
|
||||
/**
|
||||
* Obtain the Instrumentation instance for the current VM, if available.
|
||||
* @return the Instrumentation instance, or <code>null</code> if none found
|
||||
* @return the Instrumentation instance, or {@code null} if none found
|
||||
* @see #isInstrumentationAvailable()
|
||||
*/
|
||||
private static Instrumentation getInstrumentation() {
|
||||
|
||||
@@ -22,8 +22,8 @@ import java.lang.instrument.ClassFileTransformer;
|
||||
* Defines the contract for adding one or more
|
||||
* {@link ClassFileTransformer ClassFileTransformers} to a {@link ClassLoader}.
|
||||
*
|
||||
* <p>Implementations may operate on the current context <code>ClassLoader</code>
|
||||
* or expose their own instrumentable <code>ClassLoader</code>.
|
||||
* <p>Implementations may operate on the current context {@code ClassLoader}
|
||||
* or expose their own instrumentable {@code ClassLoader}.
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @author Costin Leau
|
||||
@@ -33,29 +33,29 @@ import java.lang.instrument.ClassFileTransformer;
|
||||
public interface LoadTimeWeaver {
|
||||
|
||||
/**
|
||||
* Add a <code>ClassFileTransformer</code> to be applied by this
|
||||
* <code>LoadTimeWeaver</code>.
|
||||
* @param transformer the <code>ClassFileTransformer</code> to add
|
||||
* Add a {@code ClassFileTransformer} to be applied by this
|
||||
* {@code LoadTimeWeaver}.
|
||||
* @param transformer the {@code ClassFileTransformer} to add
|
||||
*/
|
||||
void addTransformer(ClassFileTransformer transformer);
|
||||
|
||||
/**
|
||||
* Return a <code>ClassLoader</code> that supports instrumentation
|
||||
* Return a {@code ClassLoader} that supports instrumentation
|
||||
* through AspectJ-style load-time weaving based on user-defined
|
||||
* {@link ClassFileTransformer ClassFileTransformers}.
|
||||
* <p>May be the current <code>ClassLoader</code>, or a <code>ClassLoader</code>
|
||||
* <p>May be the current {@code ClassLoader}, or a {@code ClassLoader}
|
||||
* created by this {@link LoadTimeWeaver} instance.
|
||||
* @return the <code>ClassLoader</code> which will expose
|
||||
* @return the {@code ClassLoader} which will expose
|
||||
* instrumented classes according to the registered transformers
|
||||
*/
|
||||
ClassLoader getInstrumentableClassLoader();
|
||||
|
||||
/**
|
||||
* Return a throwaway <code>ClassLoader</code>, enabling classes to be
|
||||
* loaded and inspected without affecting the parent <code>ClassLoader</code>.
|
||||
* Return a throwaway {@code ClassLoader}, enabling classes to be
|
||||
* loaded and inspected without affecting the parent {@code ClassLoader}.
|
||||
* <p>Should <i>not</i> return the same instance of the {@link ClassLoader}
|
||||
* returned from an invocation of {@link #getInstrumentableClassLoader()}.
|
||||
* @return a temporary throwaway <code>ClassLoader</code>; should return
|
||||
* @return a temporary throwaway {@code ClassLoader}; should return
|
||||
* a new instance for each call, with no existing state
|
||||
*/
|
||||
ClassLoader getThrowawayClassLoader();
|
||||
|
||||
@@ -32,9 +32,9 @@ import org.springframework.util.ReflectionUtils;
|
||||
* support the following weaving methods (as defined in the {@link LoadTimeWeaver}
|
||||
* interface):
|
||||
* <ul>
|
||||
* <li><code>public void addTransformer(java.lang.instrument.ClassFileTransformer)</code>:
|
||||
* <li>{@code public void addTransformer(java.lang.instrument.ClassFileTransformer)}:
|
||||
* for registering the given ClassFileTransformer on this ClassLoader
|
||||
* <li><code>public ClassLoader getThrowawayClassLoader()</code>:
|
||||
* <li>{@code public ClassLoader getThrowawayClassLoader()}:
|
||||
* for obtaining a throwaway class loader for this ClassLoader (optional;
|
||||
* ReflectiveLoadTimeWeaver will fall back to a SimpleThrowawayClassLoader if
|
||||
* that method isn't available)
|
||||
@@ -88,9 +88,9 @@ public class ReflectiveLoadTimeWeaver implements LoadTimeWeaver {
|
||||
|
||||
/**
|
||||
* Create a new SimpleLoadTimeWeaver for the given class loader.
|
||||
* @param classLoader the <code>ClassLoader</code> to delegate to for
|
||||
* @param classLoader the {@code ClassLoader} to delegate to for
|
||||
* weaving (<i>must</i> support the required weaving methods).
|
||||
* @throws IllegalStateException if the supplied <code>ClassLoader</code>
|
||||
* @throws IllegalStateException if the supplied {@code ClassLoader}
|
||||
* does not support the required weaving methods
|
||||
*/
|
||||
public ReflectiveLoadTimeWeaver(ClassLoader classLoader) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.lang.instrument.ClassFileTransformer;
|
||||
import org.springframework.core.OverridingClassLoader;
|
||||
|
||||
/**
|
||||
* Simplistic implementation of an instrumentable <code>ClassLoader</code>.
|
||||
* Simplistic implementation of an instrumentable {@code ClassLoader}.
|
||||
*
|
||||
* <p>Usable in tests and standalone environments.
|
||||
*
|
||||
@@ -35,10 +35,10 @@ public class SimpleInstrumentableClassLoader extends OverridingClassLoader {
|
||||
|
||||
|
||||
/**
|
||||
* Create a new <code>SimpleLoadTimeWeaver</code> for the given
|
||||
* <code>ClassLoader</code>.
|
||||
* @param parent the <code>ClassLoader</code> to build a simple
|
||||
* instrumentable <code>ClassLoader</code> for
|
||||
* Create a new {@code SimpleLoadTimeWeaver} for the given
|
||||
* {@code ClassLoader}.
|
||||
* @param parent the {@code ClassLoader} to build a simple
|
||||
* instrumentable {@code ClassLoader} for
|
||||
*/
|
||||
public SimpleInstrumentableClassLoader(ClassLoader parent) {
|
||||
super(parent);
|
||||
@@ -47,9 +47,9 @@ public class SimpleInstrumentableClassLoader extends OverridingClassLoader {
|
||||
|
||||
|
||||
/**
|
||||
* Add a <code>ClassFileTransformer</code> to be applied by this
|
||||
* <code>ClassLoader</code>.
|
||||
* @param transformer the <code>ClassFileTransformer</code> to register
|
||||
* Add a {@code ClassFileTransformer} to be applied by this
|
||||
* {@code ClassLoader}.
|
||||
* @param transformer the {@code ClassFileTransformer} to register
|
||||
*/
|
||||
public void addTransformer(ClassFileTransformer transformer) {
|
||||
this.weavingTransformer.addTransformer(transformer);
|
||||
|
||||
@@ -22,12 +22,12 @@ import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
* <code>LoadTimeWeaver</code> that builds and exposes a
|
||||
* {@code LoadTimeWeaver} that builds and exposes a
|
||||
* {@link SimpleInstrumentableClassLoader}.
|
||||
*
|
||||
* <p>Mainly intended for testing environments, where it is sufficient to
|
||||
* perform all class transformation on a newly created
|
||||
* <code>ClassLoader</code> instance.
|
||||
* {@code ClassLoader} instance.
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @author Juergen Hoeller
|
||||
@@ -42,8 +42,8 @@ public class SimpleLoadTimeWeaver implements LoadTimeWeaver {
|
||||
|
||||
|
||||
/**
|
||||
* Create a new <code>SimpleLoadTimeWeaver</code> for the current context
|
||||
* <code>ClassLoader</code>.
|
||||
* Create a new {@code SimpleLoadTimeWeaver} for the current context
|
||||
* {@code ClassLoader}.
|
||||
* @see SimpleInstrumentableClassLoader
|
||||
*/
|
||||
public SimpleLoadTimeWeaver() {
|
||||
@@ -51,10 +51,10 @@ public class SimpleLoadTimeWeaver implements LoadTimeWeaver {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new <code>SimpleLoadTimeWeaver</code> for the given
|
||||
* <code>ClassLoader</code>.
|
||||
* @param classLoader the <code>ClassLoader</code> to build a simple
|
||||
* instrumentable <code>ClassLoader</code> on top of
|
||||
* Create a new {@code SimpleLoadTimeWeaver} for the given
|
||||
* {@code ClassLoader}.
|
||||
* @param classLoader the {@code ClassLoader} to build a simple
|
||||
* instrumentable {@code ClassLoader} on top of
|
||||
*/
|
||||
public SimpleLoadTimeWeaver(SimpleInstrumentableClassLoader classLoader) {
|
||||
Assert.notNull(classLoader, "ClassLoader must not be null");
|
||||
|
||||
@@ -38,7 +38,7 @@ public class GlassFishLoadTimeWeaver implements LoadTimeWeaver {
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new instance of the <code>GlassFishLoadTimeWeaver</code> class
|
||||
* Creates a new instance of the {@code GlassFishLoadTimeWeaver} class
|
||||
* using the default {@link ClassLoader}.
|
||||
* @see #GlassFishLoadTimeWeaver(ClassLoader)
|
||||
*/
|
||||
@@ -47,10 +47,10 @@ public class GlassFishLoadTimeWeaver implements LoadTimeWeaver {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance of the <code>GlassFishLoadTimeWeaver</code> class.
|
||||
* @param classLoader the specific {@link ClassLoader} to use; must not be <code>null</code>
|
||||
* @throws IllegalArgumentException if the supplied <code>classLoader</code> is <code>null</code>;
|
||||
* or if the supplied <code>classLoader</code> is not an
|
||||
* Creates a new instance of the {@code GlassFishLoadTimeWeaver} class.
|
||||
* @param classLoader the specific {@link ClassLoader} to use; must not be {@code null}
|
||||
* @throws IllegalArgumentException if the supplied {@code classLoader} is {@code null};
|
||||
* or if the supplied {@code classLoader} is not an
|
||||
* {@link org.glassfish.api.deployment.InstrumentableClassLoader InstrumentableClassLoader}
|
||||
*/
|
||||
public GlassFishLoadTimeWeaver(ClassLoader classLoader) {
|
||||
|
||||
@@ -56,8 +56,8 @@ public class JBossLoadTimeWeaver implements LoadTimeWeaver {
|
||||
/**
|
||||
* Create a new instance of the {@link JBossLoadTimeWeaver} class using
|
||||
* the supplied {@link ClassLoader}.
|
||||
* @param classLoader the <code>ClassLoader</code> to delegate to for weaving
|
||||
* (must not be <code>null</code>)
|
||||
* @param classLoader the {@code ClassLoader} to delegate to for weaving
|
||||
* (must not be {@code null})
|
||||
*/
|
||||
public JBossLoadTimeWeaver(ClassLoader classLoader) {
|
||||
Assert.notNull(classLoader, "ClassLoader must not be null");
|
||||
|
||||
@@ -37,7 +37,7 @@ class JBossMCTranslatorAdapter implements InvocationHandler {
|
||||
/**
|
||||
* Creates a new {@link JBossMCTranslatorAdapter}.
|
||||
* @param transformer the {@link ClassFileTransformer} to be adapted (must
|
||||
* not be <code>null</code>)
|
||||
* not be {@code null})
|
||||
*/
|
||||
public JBossMCTranslatorAdapter(ClassFileTransformer transformer) {
|
||||
this.transformer = transformer;
|
||||
|
||||
@@ -37,7 +37,7 @@ class OC4JClassPreprocessorAdapter implements InvocationHandler {
|
||||
/**
|
||||
* Creates a new {@link OC4JClassPreprocessorAdapter}.
|
||||
* @param transformer the {@link ClassFileTransformer} to be adapted (must
|
||||
* not be <code>null</code>)
|
||||
* not be {@code null})
|
||||
*/
|
||||
public OC4JClassPreprocessorAdapter(ClassFileTransformer transformer) {
|
||||
this.transformer = transformer;
|
||||
|
||||
@@ -54,7 +54,7 @@ public class OC4JLoadTimeWeaver implements LoadTimeWeaver {
|
||||
/**
|
||||
* Creates a new instance of the {@link OC4JLoadTimeWeaver} class
|
||||
* using the supplied {@link ClassLoader}.
|
||||
* @param classLoader the <code>ClassLoader</code> to delegate to for weaving
|
||||
* @param classLoader the {@code ClassLoader} to delegate to for weaving
|
||||
*/
|
||||
public OC4JLoadTimeWeaver(ClassLoader classLoader) {
|
||||
Assert.notNull(classLoader, "ClassLoader must not be null");
|
||||
|
||||
@@ -42,7 +42,7 @@ class WebLogicClassPreProcessorAdapter implements InvocationHandler {
|
||||
/**
|
||||
* Creates a new {@link WebLogicClassPreProcessorAdapter}.
|
||||
* @param transformer the {@link ClassFileTransformer} to be adapted (must
|
||||
* not be <code>null</code>)
|
||||
* not be {@code null})
|
||||
*/
|
||||
public WebLogicClassPreProcessorAdapter(ClassFileTransformer transformer, ClassLoader loader) {
|
||||
this.transformer = transformer;
|
||||
|
||||
@@ -49,8 +49,8 @@ public class WebLogicLoadTimeWeaver implements LoadTimeWeaver {
|
||||
/**
|
||||
* Creates a new instance of the {@link WebLogicLoadTimeWeaver} class using
|
||||
* the supplied {@link ClassLoader}.
|
||||
* @param classLoader the <code>ClassLoader</code> to delegate to for
|
||||
* weaving (must not be <code>null</code>)
|
||||
* @param classLoader the {@code ClassLoader} to delegate to for
|
||||
* weaving (must not be {@code null})
|
||||
*/
|
||||
public WebLogicLoadTimeWeaver(ClassLoader classLoader) {
|
||||
Assert.notNull(classLoader, "ClassLoader must not be null");
|
||||
|
||||
@@ -40,7 +40,7 @@ class WebSphereClassPreDefinePlugin implements InvocationHandler {
|
||||
/**
|
||||
* Create a new {@link WebSphereClassPreDefinePlugin}.
|
||||
* @param transformer the {@link ClassFileTransformer} to be adapted
|
||||
* (must not be <code>null</code>)
|
||||
* (must not be {@code null})
|
||||
*/
|
||||
public WebSphereClassPreDefinePlugin(ClassFileTransformer transformer) {
|
||||
this.transformer = transformer;
|
||||
|
||||
@@ -46,8 +46,8 @@ public class WebSphereLoadTimeWeaver implements LoadTimeWeaver {
|
||||
/**
|
||||
* Create a new instance of the {@link WebSphereLoadTimeWeaver} class using
|
||||
* the supplied {@link ClassLoader}.
|
||||
* @param classLoader the <code>ClassLoader</code> to delegate to for weaving
|
||||
* (must not be <code>null</code>)
|
||||
* @param classLoader the {@code ClassLoader} to delegate to for weaving
|
||||
* (must not be {@code null})
|
||||
*/
|
||||
public WebSphereLoadTimeWeaver(ClassLoader classLoader) {
|
||||
Assert.notNull(classLoader, "ClassLoader must not be null");
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package org.springframework.jmx;
|
||||
|
||||
/**
|
||||
* Exception thrown when we cannot locate an instance of an <code>MBeanServer</code>,
|
||||
* Exception thrown when we cannot locate an instance of an {@code MBeanServer},
|
||||
* or when more than one instance is found.
|
||||
*
|
||||
* @author Rob Harrop
|
||||
@@ -28,7 +28,7 @@ package org.springframework.jmx;
|
||||
public class MBeanServerNotFoundException extends JmxException {
|
||||
|
||||
/**
|
||||
* Create a new <code>MBeanServerNotFoundException</code> with the
|
||||
* Create a new {@code MBeanServerNotFoundException} with the
|
||||
* supplied error message.
|
||||
* @param msg the error message
|
||||
*/
|
||||
@@ -37,7 +37,7 @@ public class MBeanServerNotFoundException extends JmxException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new <code>MBeanServerNotFoundException</code> with the
|
||||
* Create a new {@code MBeanServerNotFoundException} with the
|
||||
* specified error message and root cause.
|
||||
* @param msg the error message
|
||||
* @param cause the root cause
|
||||
|
||||
@@ -44,11 +44,11 @@ class ConnectorDelegate {
|
||||
|
||||
|
||||
/**
|
||||
* Connects to the remote <code>MBeanServer</code> using the configured <code>JMXServiceURL</code>:
|
||||
* Connects to the remote {@code MBeanServer} using the configured {@code JMXServiceURL}:
|
||||
* to the specified JMX service, or to a local MBeanServer if no service URL specified.
|
||||
* @param serviceUrl the JMX service URL to connect to (may be <code>null</code>)
|
||||
* @param environment the JMX environment for the connector (may be <code>null</code>)
|
||||
* @param agentId the local JMX MBeanServer's agent id (may be <code>null</code>)
|
||||
* @param serviceUrl the JMX service URL to connect to (may be {@code null})
|
||||
* @param environment the JMX environment for the connector (may be {@code null})
|
||||
* @param agentId the local JMX MBeanServer's agent id (may be {@code null})
|
||||
*/
|
||||
public MBeanServerConnection connect(JMXServiceURL serviceUrl, Map<String, ?> environment, String agentId)
|
||||
throws MBeanServerNotFoundException {
|
||||
@@ -72,7 +72,7 @@ class ConnectorDelegate {
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes any <code>JMXConnector</code> that may be managed by this interceptor.
|
||||
* Closes any {@code JMXConnector} that may be managed by this interceptor.
|
||||
*/
|
||||
public void close() {
|
||||
if (this.connector != null) {
|
||||
|
||||
@@ -30,7 +30,7 @@ import javax.management.JMRuntimeException;
|
||||
public class InvalidInvocationException extends JMRuntimeException {
|
||||
|
||||
/**
|
||||
* Create a new <code>InvalidInvocationException</code> with the supplied
|
||||
* Create a new {@code InvalidInvocationException} with the supplied
|
||||
* error message.
|
||||
* @param msg the detail message
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.jmx.JmxException;
|
||||
public class InvocationFailureException extends JmxException {
|
||||
|
||||
/**
|
||||
* Create a new <code>InvocationFailureException</code> with the supplied
|
||||
* Create a new {@code InvocationFailureException} with the supplied
|
||||
* error message.
|
||||
* @param msg the detail message
|
||||
*/
|
||||
@@ -38,7 +38,7 @@ public class InvocationFailureException extends JmxException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new <code>InvocationFailureException</code> with the
|
||||
* Create a new {@code InvocationFailureException} with the
|
||||
* specified error message and root cause.
|
||||
* @param msg the detail message
|
||||
* @param cause the root cause
|
||||
|
||||
@@ -66,12 +66,12 @@ import org.springframework.util.ReflectionUtils;
|
||||
|
||||
/**
|
||||
* {@link org.aopalliance.intercept.MethodInterceptor} that routes calls to an
|
||||
* MBean running on the supplied <code>MBeanServerConnection</code>.
|
||||
* Works for both local and remote <code>MBeanServerConnection</code>s.
|
||||
* MBean running on the supplied {@code MBeanServerConnection}.
|
||||
* Works for both local and remote {@code MBeanServerConnection}s.
|
||||
*
|
||||
* <p>By default, the <code>MBeanClientInterceptor</code> will connect to the
|
||||
* <code>MBeanServer</code> and cache MBean metadata at startup. This can
|
||||
* be undesirable when running against a remote <code>MBeanServer</code>
|
||||
* <p>By default, the {@code MBeanClientInterceptor} will connect to the
|
||||
* {@code MBeanServer} and cache MBean metadata at startup. This can
|
||||
* be undesirable when running against a remote {@code MBeanServer}
|
||||
* that may not be running when the application starts. Through setting the
|
||||
* {@link #setConnectOnStartup(boolean) connectOnStartup} property to "false",
|
||||
* you can defer this process until the first invocation against the proxy.
|
||||
@@ -127,7 +127,7 @@ public class MBeanClientInterceptor
|
||||
|
||||
|
||||
/**
|
||||
* Set the <code>MBeanServerConnection</code> used to connect to the
|
||||
* Set the {@code MBeanServerConnection} used to connect to the
|
||||
* MBean which all invocations are routed to.
|
||||
*/
|
||||
public void setServer(MBeanServerConnection server) {
|
||||
@@ -135,7 +135,7 @@ public class MBeanClientInterceptor
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the service URL of the remote <code>MBeanServer</code>.
|
||||
* Set the service URL of the remote {@code MBeanServer}.
|
||||
*/
|
||||
public void setServiceUrl(String url) throws MalformedURLException {
|
||||
this.serviceUrl = new JMXServiceURL(url);
|
||||
@@ -161,7 +161,7 @@ public class MBeanClientInterceptor
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the agent id of the <code>MBeanServer</code> to locate.
|
||||
* Set the agent id of the {@code MBeanServer} to locate.
|
||||
* <p>Default is none. If specified, this will result in an
|
||||
* attempt being made to locate the attendant MBeanServer, unless
|
||||
* the {@link #setServiceUrl "serviceUrl"} property has been set.
|
||||
@@ -173,7 +173,7 @@ public class MBeanClientInterceptor
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether or not the proxy should connect to the <code>MBeanServer</code>
|
||||
* Set whether or not the proxy should connect to the {@code MBeanServer}
|
||||
* at creation time ("true") or the first time it is invoked ("false").
|
||||
* Default is "true".
|
||||
*/
|
||||
@@ -192,8 +192,8 @@ public class MBeanClientInterceptor
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the <code>ObjectName</code> of the MBean which calls are routed to,
|
||||
* as <code>ObjectName</code> instance or as <code>String</code>.
|
||||
* Set the {@code ObjectName} of the MBean which calls are routed to,
|
||||
* as {@code ObjectName} instance or as {@code String}.
|
||||
*/
|
||||
public void setObjectName(Object objectName) throws MalformedObjectNameException {
|
||||
this.objectName = ObjectNameManager.getInstance(objectName);
|
||||
@@ -202,9 +202,9 @@ public class MBeanClientInterceptor
|
||||
/**
|
||||
* Set whether to use strict casing for attributes. Enabled by default.
|
||||
* <p>When using strict casing, a JavaBean property with a getter such as
|
||||
* <code>getFoo()</code> translates to an attribute called <code>Foo</code>.
|
||||
* With strict casing disabled, <code>getFoo()</code> would translate to just
|
||||
* <code>foo</code>.
|
||||
* {@code getFoo()} translates to an attribute called {@code Foo}.
|
||||
* With strict casing disabled, {@code getFoo()} would translate to just
|
||||
* {@code foo}.
|
||||
*/
|
||||
public void setUseStrictCasing(boolean useStrictCasing) {
|
||||
this.useStrictCasing = useStrictCasing;
|
||||
@@ -221,7 +221,7 @@ public class MBeanClientInterceptor
|
||||
|
||||
/**
|
||||
* Return the management interface of the target MBean,
|
||||
* or <code>null</code> if none specified.
|
||||
* or {@code null} if none specified.
|
||||
*/
|
||||
protected final Class getManagementInterface() {
|
||||
return this.managementInterface;
|
||||
@@ -233,7 +233,7 @@ public class MBeanClientInterceptor
|
||||
|
||||
|
||||
/**
|
||||
* Prepares the <code>MBeanServerConnection</code> if the "connectOnStartup"
|
||||
* Prepares the {@code MBeanServerConnection} if the "connectOnStartup"
|
||||
* is turned on (which it is by default).
|
||||
*/
|
||||
public void afterPropertiesSet() {
|
||||
@@ -247,7 +247,7 @@ public class MBeanClientInterceptor
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that an <code>MBeanServerConnection</code> is configured and attempts
|
||||
* Ensures that an {@code MBeanServerConnection} is configured and attempts
|
||||
* to detect a local connection if one is not supplied.
|
||||
*/
|
||||
public void prepare() {
|
||||
@@ -336,7 +336,7 @@ public class MBeanClientInterceptor
|
||||
|
||||
/**
|
||||
* Route the invocation to the configured managed resource..
|
||||
* @param invocation the <code>MethodInvocation</code> to re-route
|
||||
* @param invocation the {@code MethodInvocation} to re-route
|
||||
* @return the value returned as a result of the re-routed invocation
|
||||
* @throws Throwable an invocation error propagated to the user
|
||||
* @see #doInvoke
|
||||
@@ -391,9 +391,9 @@ public class MBeanClientInterceptor
|
||||
|
||||
/**
|
||||
* Route the invocation to the configured managed resource. Correctly routes JavaBean property
|
||||
* access to <code>MBeanServerConnection.get/setAttribute</code> and method invocation to
|
||||
* <code>MBeanServerConnection.invoke</code>.
|
||||
* @param invocation the <code>MethodInvocation</code> to re-route
|
||||
* access to {@code MBeanServerConnection.get/setAttribute} and method invocation to
|
||||
* {@code MBeanServerConnection.invoke}.
|
||||
* @param invocation the {@code MethodInvocation} to re-route
|
||||
* @return the value returned as a result of the re-routed invocation
|
||||
* @throws Throwable an invocation error propagated to the user
|
||||
*/
|
||||
@@ -525,7 +525,7 @@ public class MBeanClientInterceptor
|
||||
/**
|
||||
* Convert the given result object (from attribute access or operation invocation)
|
||||
* to the specified target class for returning from the proxy method.
|
||||
* @param result the result object as returned by the <code>MBeanServer</code>
|
||||
* @param result the result object as returned by the {@code MBeanServer}
|
||||
* @param parameter the method parameter of the proxy method that's been invoked
|
||||
* @return the converted result object, or the passed-in object if no conversion
|
||||
* is necessary
|
||||
@@ -619,7 +619,7 @@ public class MBeanClientInterceptor
|
||||
private final Class[] parameterTypes;
|
||||
|
||||
/**
|
||||
* Create a new instance of <code>MethodCacheKey</code> with the supplied
|
||||
* Create a new instance of {@code MethodCacheKey} with the supplied
|
||||
* method name and parameter list.
|
||||
* @param name the name of the method
|
||||
* @param parameterTypes the arguments in the method signature
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.jmx.JmxException;
|
||||
public class MBeanConnectFailureException extends JmxException {
|
||||
|
||||
/**
|
||||
* Create a new <code>MBeanConnectFailureException</code>
|
||||
* Create a new {@code MBeanConnectFailureException}
|
||||
* with the specified error message and root cause.
|
||||
* @param msg the detail message
|
||||
* @param cause the root cause
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.springframework.jmx.JmxException;
|
||||
public class MBeanInfoRetrievalException extends JmxException {
|
||||
|
||||
/**
|
||||
* Create a new <code>MBeanInfoRetrievalException</code> with the
|
||||
* Create a new {@code MBeanInfoRetrievalException} with the
|
||||
* specified error message.
|
||||
* @param msg the detail message
|
||||
*/
|
||||
@@ -40,7 +40,7 @@ public class MBeanInfoRetrievalException extends JmxException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new <code>MBeanInfoRetrievalException</code> with the
|
||||
* Create a new {@code MBeanInfoRetrievalException} with the
|
||||
* specified error message and root cause.
|
||||
* @param msg the detail message
|
||||
* @param cause the root cause
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.springframework.util.ClassUtils;
|
||||
*
|
||||
* <p>Attempting to invoke or access any method or property on the proxy
|
||||
* interface that does not correspond to the management interface will lead
|
||||
* to an <code>InvalidInvocationException</code>.
|
||||
* to an {@code InvalidInvocationException}.
|
||||
*
|
||||
* @author Rob Harrop
|
||||
* @author Juergen Hoeller
|
||||
@@ -72,7 +72,7 @@ public class MBeanProxyFactoryBean extends MBeanClientInterceptor
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the <code>proxyInterface</code> has been specified and then
|
||||
* Checks that the {@code proxyInterface} has been specified and then
|
||||
* generates the proxy for the target MBean.
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -66,7 +66,7 @@ public class NotificationListenerRegistrar extends NotificationListenerHolder
|
||||
|
||||
|
||||
/**
|
||||
* Set the <code>MBeanServerConnection</code> used to connect to the
|
||||
* Set the {@code MBeanServerConnection} used to connect to the
|
||||
* MBean which all invocations are routed to.
|
||||
*/
|
||||
public void setServer(MBeanServerConnection server) {
|
||||
@@ -93,14 +93,14 @@ public class NotificationListenerRegistrar extends NotificationListenerHolder
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the service URL of the remote <code>MBeanServer</code>.
|
||||
* Set the service URL of the remote {@code MBeanServer}.
|
||||
*/
|
||||
public void setServiceUrl(String url) throws MalformedURLException {
|
||||
this.serviceUrl = new JMXServiceURL(url);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the agent id of the <code>MBeanServer</code> to locate.
|
||||
* Set the agent id of the {@code MBeanServer} to locate.
|
||||
* <p>Default is none. If specified, this will result in an
|
||||
* attempt being made to locate the attendant MBeanServer, unless
|
||||
* the {@link #setServiceUrl "serviceUrl"} property has been set.
|
||||
@@ -123,8 +123,8 @@ public class NotificationListenerRegistrar extends NotificationListenerHolder
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the specified <code>NotificationListener</code>.
|
||||
* <p>Ensures that an <code>MBeanServerConnection</code> is configured and attempts
|
||||
* Registers the specified {@code NotificationListener}.
|
||||
* <p>Ensures that an {@code MBeanServerConnection} is configured and attempts
|
||||
* to detect a local connection if one is not supplied.
|
||||
*/
|
||||
public void prepare() {
|
||||
@@ -151,7 +151,7 @@ public class NotificationListenerRegistrar extends NotificationListenerHolder
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters the specified <code>NotificationListener</code>.
|
||||
* Unregisters the specified {@code NotificationListener}.
|
||||
*/
|
||||
public void destroy() {
|
||||
try {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user