org.apache.lucene.gdata.server
Class ServiceFactory

java.lang.Object
  extended by org.apache.lucene.gdata.server.ServiceFactory
All Implemented Interfaces:
ServerComponent

public class ServiceFactory
extends Object
implements ServerComponent

The ServiceFactory creates Service implementations to access the GData - Server components. This class should not be access directy. The class will be registered in the GDataServerRegistry. Use GDataServerRegistry.lookup(Class, ComponentType)

Author:
Simon Willnauer

Constructor Summary
ServiceFactory()
          public constructor to enable loading via the registry
 
Method Summary
 void destroy()
          will be called when the registry is going down e.g.
 AdminService getAdminService()
          Creates a AdminService instance
 Service getService(GDataRequest request)
          Creates a Service instance.
 void initialize()
          will be call when the component is registered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceFactory

public ServiceFactory()
public constructor to enable loading via the registry

See Also:
Component, GDataServerRegistry
Method Detail

getService

public Service getService(GDataRequest request)
Creates a Service instance.

Parameters:
request - - the request for this service
Returns:
a Service instance

getAdminService

public AdminService getAdminService()
Creates a AdminService instance

Returns:
a AdminService instance

initialize

public void initialize()
Description copied from interface: ServerComponent
will be call when the component is registered. if this fails the server must not startup.

Specified by:
initialize in interface ServerComponent
See Also:
ServerComponent.initialize()

destroy

public void destroy()
Description copied from interface: ServerComponent
will be called when the registry is going down e.g. when the GDataServerRegistry.destroy() method is called.

Specified by:
destroy in interface ServerComponent
See Also:
ServerComponent.destroy()


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