net.sf.spif.example
Class ExampleService

java.lang.Object
  |
  +--net.sf.spif.example.ExampleService

public class ExampleService
extends java.lang.Object

A service is the access point to a component package. By using making the service a pluggable singleton, service functionality can be overridden for different run-time contextes without affecting client code. See The Service Pattern.

Version:
$Id: ExampleService.java,v 1.2 2003/02/11 22:49:38 bratseth Exp $
Author:
Jon S Bratseth

Constructor Summary
ExampleService()
          Use get() instead to get the instance to use.
 
Method Summary
static ExampleService get()
          Returns this service
 void initialize(java.lang.String datasource)
          Initializes this service.
static void set(ExampleService service)
          Sets the service instance to use (usually a subclass)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExampleService

public ExampleService()
Use get() instead to get the instance to use. Use this only to create an instance for all to use.

Method Detail

get

public static ExampleService get()
Returns this service


set

public static void set(ExampleService service)
Sets the service instance to use (usually a subclass)


initialize

public void initialize(java.lang.String datasource)
Initializes this service. This may entail replacing the official instance

Parameters:
datasource - any initializing context information may be given here, here, a datasource or null to run non-persistent


Spif 1.01 (2003-04-03). http://spif.sf.net