FileDocCategorySizeDatePackage
Component.javaAPI DocApache Lucene 2.1.03009Wed Feb 14 10:46:06 GMT 2007org.apache.lucene.gdata.server.registry

Component

public class Component
The {@link 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 {@link org.apache.lucene.gdata.server.registry.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 {@link org.apache.lucene.gdata.server.registry.ComponentType} enumeration. Each of the enum types are annotated with a {@link org.apache.lucene.gdata.server.registry.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 {@link org.apache.lucene.gdata.storage.Storage}.

Each ComponentType can only registerd once as the {@link org.apache.lucene.gdata.server.registry.GDataServerRegistry} does not provide multipe instances of a ComponentType.

This annotation can only annotate types and can be accessed at runtime. {@link java.lang.annotation.Target} == {@link java.lang.annotation.ElementType#TYPE} and {@link java.lang.annotation.Retention} == {@link java.lang.annotation.RetentionPolicy#RUNTIME}.

see
org.apache.lucene.gdata.server.registry.GDataServerRegistry
see
org.apache.lucene.gdata.server.registry.ComponentType
see
org.apache.lucene.gdata.server.registry.SuperType
author
Simon Willnauer

Fields Summary
Constructors Summary
Methods Summary
ComponentTypecomponentType()

see
ComponentType
return
- the component type