2014-01-06 19:19:17 +00:00
|
|
|
#ifndef __SESSION_MANAGER_FACTORY_HPP
|
|
|
|
#define __SESSION_MANAGER_FACTORY_HPP
|
|
|
|
|
|
|
|
#include "session/ConfigurationException.hpp"
|
|
|
|
#include "session/EPPIOException.hpp"
|
|
|
|
|
|
|
|
#include "session/SessionManagerProperties.hpp"
|
|
|
|
#include "session/SessionManager.hpp"
|
|
|
|
|
2014-01-16 15:35:39 +00:00
|
|
|
#ifndef KEEPINSYNCWMD
|
|
|
|
#define KEEPINSYNCWMD
|
|
|
|
enum acTKScenario {
|
|
|
|
ACTK_ALONE = 0,
|
|
|
|
ACTK_INSECURE,
|
2014-01-18 20:35:18 +00:00
|
|
|
ACTK_OTEA, // Connectivity
|
|
|
|
ACTK_OTEB, // Basic Access
|
|
|
|
ACTK_OTEC, // Full Access
|
2014-01-16 15:35:39 +00:00
|
|
|
ACTK_PROD,
|
|
|
|
N_ACTK_SCENARIOS
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2014-01-06 19:19:17 +00:00
|
|
|
/**
|
|
|
|
* This factory provides instances of SessionManager implementations. The
|
|
|
|
* default SessionManager implementation is
|
2014-01-24 20:49:09 +00:00
|
|
|
* mop.bizsregistry.jtoolkit2.session.SessionManagerImpl. Alternative
|
2014-01-06 19:19:17 +00:00
|
|
|
* implementations may be loaded as described in the newInstance
|
|
|
|
* descriptions.
|
|
|
|
*/
|
|
|
|
class SessionManagerFactory
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
/**
|
|
|
|
* Create a new SessionManager instance. The implementation defaults to
|
|
|
|
* SessionManagerImpl but may be overridden by setting the system
|
2014-01-24 20:49:09 +00:00
|
|
|
* property mop.bizsregistry.jtoolkit2.sessionManager.class to the full
|
2014-01-06 19:19:17 +00:00
|
|
|
* name of the alternative class.
|
|
|
|
*
|
|
|
|
* @param propertiesFile The location of a properties file to be used to
|
|
|
|
* configure the new SessionManager. This method attempts to load a new
|
|
|
|
* SessionManagerProperties object from this file before creating the
|
|
|
|
* SessionManager.
|
|
|
|
*
|
|
|
|
* @throws IOException The properties object was unable to load properties
|
|
|
|
* from the named file. The exception may indicate the cause via
|
|
|
|
* getCause().
|
|
|
|
*
|
|
|
|
* @throws ConfigurationException The SessionManager was not successfully
|
|
|
|
* configured based on the properties loaded from the given file. The
|
|
|
|
* cause of the failure should be available via getCause().
|
|
|
|
*/
|
|
|
|
static SessionManager* newInstance(const std::string &propertiesFile)
|
|
|
|
throw (ConfigurationException, EPPIOException);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new SessionManager instance. The implementation defaults to
|
|
|
|
* SessionManagerImpl but may be overridden by setting the system
|
2014-01-24 20:49:09 +00:00
|
|
|
* property mop.bizsregistry.jtoolkit2.sessionManager.class to the full
|
2014-01-06 19:19:17 +00:00
|
|
|
* name of the alternative class.
|
|
|
|
*
|
|
|
|
* @param props SessionManager properties that have already been loaded.
|
|
|
|
* This method assumes that the properties are already loaded and therefore
|
|
|
|
* does not attempt to do so.
|
|
|
|
*
|
|
|
|
* @throws ConfigurationException The SessionManager was not successfully
|
|
|
|
* configured based on the given properties. The cause of the failure
|
|
|
|
* should be available via getCause().
|
|
|
|
*
|
|
|
|
* Upon success, assumes ownership of props.
|
|
|
|
*/
|
|
|
|
static SessionManager* newInstance(SessionManagerProperties* props)
|
|
|
|
throw (ConfigurationException);
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
/**
|
|
|
|
* Create a new SessionManager instance. The implementation actually
|
|
|
|
* loaded is determined by the class name provided.
|
|
|
|
*
|
|
|
|
* @param props SessionManager properties that have already been loaded.
|
|
|
|
* This method assumes that the properties are already loaded and therefore
|
|
|
|
* does not attempt to do so.
|
|
|
|
*
|
|
|
|
* @throws ConfigurationException The SessionManager was not successfully
|
|
|
|
* configured based on the given properties. The cause of the failure
|
|
|
|
* should be available via getCause().
|
|
|
|
*
|
|
|
|
* Upon success, assumes ownership of props.
|
|
|
|
*/
|
|
|
|
static SessionManager * newInstance (SessionManagerProperties* props,
|
|
|
|
const std::string &className)
|
|
|
|
// throw (FactoryConfigurationError, ConfigurationException);
|
|
|
|
throw (ConfigurationException);
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __SESSION_MANAGER_FACTORY_HPP
|