1 /*
2 * Copyright 2007 the original author or authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package org.springframework.ws.server.endpoint.annotation;
18
19 import java.lang.annotation.Documented;
20 import java.lang.annotation.ElementType;
21 import java.lang.annotation.Retention;
22 import java.lang.annotation.RetentionPolicy;
23 import java.lang.annotation.Target;
24
25 import org.springframework.stereotype.Component;
26 import org.springframework.ws.server.endpoint.mapping.AbstractAnnotationMethodEndpointMapping;
27 import org.springframework.ws.soap.server.endpoint.mapping.SoapActionAnnotationMethodEndpointMapping;
28
29 /**
30 * Indicates that an annotated class is an "Endpoint" (e.g. a web service endpoint).
31 * <p/>
32 * This annotation serves as a specialization of {@link Component @Component}, allowing for implementation classes to be
33 * autodetected through classpath scanning. Instances of this class are typically picked up by an {@link
34 * AbstractAnnotationMethodEndpointMapping} implementation, such as {@link SoapActionAnnotationMethodEndpointMapping}.
35 *
36 * @author Arjen Poutsma
37 * @see org.springframework.context.annotation.ClassPathBeanDefinitionScanner
38 * @since 1.0.0
39 */
40 @Target(ElementType.TYPE)
41 @Retention(RetentionPolicy.RUNTIME)
42 @Documented
43 @Component
44 public @interface Endpoint {
45
46 /**
47 * The value may indicate a suggestion for a logical component name, to be turned into a Spring bean in case of an
48 * autodetected component.
49 *
50 * @return the suggested component name, if any
51 */
52 String value() default "";
53
54 }