jpos.loader.simple
Class SimpleServiceManager

java.lang.Object
  |
  +--jpos.loader.simple.SimpleServiceManager
All Implemented Interfaces:
JposServiceManager

public class SimpleServiceManager
extends java.lang.Object
implements JposServiceManager

This is a simple implementation of the JposServiceManager interface

Since:
0.1 (Philly 99 meeting)
Author:
E. Michael Maximilien (maxim@us.ibm.com)

Constructor Summary
SimpleServiceManager()
          Deprecated. replaced by 1-argument ctor
SimpleServiceManager(JposProperties properties)
          One argument ctor
 
Method Summary
 JposServiceConnection createConnection(java.lang.String logicalName)
           
 JposEntryRegistry getEntryRegistry()
           
 ProfileRegistry getProfileRegistry()
           
 JposProperties getProperties()
           
 JposRegPopulator getRegPopulator()
           
 Profile loadProfile(java.lang.String xmlProfileFileName)
          Tries to load the Profile by specified in the file.
 void reloadEntryRegistry()
          Ask the manager to reload the registry by reloading the properties file creating a new registry and repopulating the registry.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleServiceManager

public SimpleServiceManager()
Deprecated. replaced by 1-argument ctor

Default ctor NOTE: necessary because it will be used by jpos.config.JposServiceLoader to create the simple factory
Since:
0.1 (Philly 99 meeting)

SimpleServiceManager

public SimpleServiceManager(JposProperties properties)
One argument ctor
Parameters:
properties - the JposProperties for this manager NOTE: this could be an instance of the simple jpos.loader.DefaultProperties or a this class could also create its own JposProperties object
Method Detail

getEntryRegistry

public JposEntryRegistry getEntryRegistry()
Specified by:
getEntryRegistry in interface JposServiceManager
Returns:
the JposEntryRegistry object
Since:
0.1 (Philly 99 meeting)

getProperties

public JposProperties getProperties()
Specified by:
getProperties in interface JposServiceManager
Returns:
the JposProperties object containing access to all Jpos properties
Since:
1.2 (NY 2K meeting)

getRegPopulator

public JposRegPopulator getRegPopulator()
Specified by:
getRegPopulator in interface JposServiceManager
Returns:
the JposRegPopulator object used to populate the registry
Since:
1.2 (NY 2K meeting)

createConnection

public JposServiceConnection createConnection(java.lang.String logicalName)
                                       throws jpos.JposException
Specified by:
createConnection in interface JposServiceManager
Parameters:
logicalName - the logical name of the service to find
Returns:
a ServiceConnection used to connect to the service
Throws:
jpos.config.JposException -  
Since:
0.1 (Philly 99 meeting)

getProfileRegistry

public ProfileRegistry getProfileRegistry()
Specified by:
getProfileRegistry in interface JposServiceManager
Returns:
the current ProfileRegistry
Since:
1.3 (SF 2K meeting)

loadProfile

public Profile loadProfile(java.lang.String xmlProfileFileName)
                    throws ProfileException
Tries to load the Profile by specified in the file. If successful returns it and adds it to the ProfileRegistry otherwise throw exception
Specified by:
loadProfile in interface JposServiceManager
Parameters:
xmlProfileFileName - the file name for the XML profile
Returns:
the profile specified in the XML profile file after loading it
Throws:
ProfileException - if the profile could not be loaded from file
Since:
1.3 (SF 2K meeting)

reloadEntryRegistry

public void reloadEntryRegistry()
Ask the manager to reload the registry by reloading the properties file creating a new registry and repopulating the registry. Also creates sets the JposRegPopulator for the registry as a side-effect NOTE: this method should only be used if at runtime the properties and/or populator files have changed
Specified by:
reloadEntryRegistry in interface JposServiceManager
Since:
1.3 (Washington DC 2001 meeting)


This API and code belongs to the JavaPOS committee please see LISCENCE file for details