org.apache.lucene.gdata.server.registry
Annotation Type Component


@Target(value=TYPE)
@Retention(value=RUNTIME)
public @interface Component

The Component annotation is used to annotate a class as a server-component of the GDATA-Server. Annotated class can be configured via the gdata-config.xml file to be looked up by aribaty classes at runtime via the GDataServerRegistry.lookup(Class, ComponentType) method.

Classes annotated with the Component annotation need to provide a default constructor to be instanciated via reflection. Components of the GData-Server are definded in the ComponentType enumeration. Each of the enum types are annotated with a SuperType annotation. This annotation specifies the super class or interface of the component. A class annotated with the Component annotation must implement or extends this defined super-type. This enables developers to use custom implemetations of the component like a custom Storage.

Each ComponentType can only registerd once as the GDataServerRegistry does not provide multipe instances of a ComponentType.

This annotation can only annotate types and can be accessed at runtime. Target == ElementType.TYPE and Retention == RetentionPolicy.RUNTIME.

Author:
Simon Willnauer
See Also:
GDataServerRegistry, ComponentType, SuperType

Required Element Summary
 ComponentType componentType
           
 

Element Detail

componentType

public abstract ComponentType componentType
Returns:
- the component type
See Also:
ComponentType


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.