jpos.loader
Interface JposServiceManager

All Known Implementing Classes:
SimpleServiceManager

public interface JposServiceManager

An implementation of the jpos.config must provide an implementation of this interface which is used to create the JposServiceConnection objects. This also provides a way to access the JposEntryPopulator to allow for dynamic updates of the currently configured JposEntry objects.

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

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.
 

Method Detail

createConnection

public JposServiceConnection createConnection(java.lang.String logicalName)
                                       throws jpos.JposException
Returns:
a JposServiceConnection for the service with the logical name specified This should use the populator to see if there exist any entry with the logical name provided, get the entry and create the JposServiceConnection
Throws:
jpos.JposException - if an error occurs while creating this connection
Since:
0.1 (Philly 99 meeting)

getEntryRegistry

public JposEntryRegistry getEntryRegistry()
Returns:
the JposEntryRegistry object that this factory uses to allow entries to be querried and added dynamically
Since:
0.1 (Philly 99 meeting)

getProperties

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

getRegPopulator

public JposRegPopulator getRegPopulator()
Returns:
the JposRegPopulator object used to populate the registry
Since:
1.2 (NY 2K meeting)

getProfileRegistry

public ProfileRegistry getProfileRegistry()
Returns:
the ProfileRegistry currently loaded
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
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
Since:
1.3 (Washington DC 2001 meeting)


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