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}. |