Clearspace API (1.10.16) Core Javadocs

com.jivesoftware.spi
Interface ServiceProvider

All Known Subinterfaces:
AuthenticationProvider, UserProvider

public interface ServiceProvider

A basic lifecycle interface that all Service Provider implementation have to implement. Any class that implements this interface will become available for loading through the ServiceLoader class. Classes implementing this interface must provide a no argument constructor. Any intialization that is needed should be done in the intialize() method. The system will pass all configuration data that is associated with the service when calling the initialize method.


Method Summary
 void destroy()
          This method is called to allow services to shutdown/close any open resources and perform any clean up that is needed.
 java.util.Map<java.lang.String,java.lang.String> getConfigurationMap()
          This method is must return all of the configuration keys that need to be set before calling initialize method.
 void initialize(java.util.Map<java.lang.String,java.lang.String> context)
          Initialization of the service should be performed in this method.
 

Method Detail

getConfigurationMap

java.util.Map<java.lang.String,java.lang.String> getConfigurationMap()
This method is must return all of the configuration keys that need to be set before calling initialize method. Provide sensible default values that can be used in case no configuration data is available. The service will be intialized using a configuration map with keys and default values that were returned by this method.

Returns:
Map of configuration keys and associated default values.

initialize

void initialize(java.util.Map<java.lang.String,java.lang.String> context)
Initialization of the service should be performed in this method. The system will pass the configuration associated with service in the context.

Parameters:
context - Configuration data that is associated with this service.

destroy

void destroy()
This method is called to allow services to shutdown/close any open resources and perform any clean up that is needed.


Clearspace Project Page

Copyright © 1999-2007 Jive Software.