public class AdapterEnvironment
extends java.lang.Object
For example, the default Social Commerce AdapterEnvironment is initialized in a similar way as the following code:
GCConfigManager manager = new GCConfigManager(); // initialize properties in the manager IRequestContextFactory factory = new GCRequestContextFactory(); AdapterEnvironment.initialize(manager,factory);
Notice that the GCConfigManager instance is initialized with the properties that it will return to callers of its getProperty() method. The GCConfigManager and GCRequestContextFactory classes are implemented specifically to work within the Social Commerce sMash application. Other applications that wish to instantiate an AdapterEnvironment may need their own customized IConfigManager and IRequestContextFactory implementations.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
Copy Right Statement
|
Constructor and Description |
---|
AdapterEnvironment() |
Modifier and Type | Method and Description |
---|---|
static IServiceAdapter | getAdapter(java.lang.Class adapterClass)
Returns an instance of the given adapter class.
|
static IConfigManager | getConfigManager() |
static IRequestContextFactory | getRequestContextFactory() |
static void | initialize(IConfigManager configMgr, IRequestContextFactory reqContextFactory)
Initializes the AdapterEnvironment class.
|
public static final java.lang.String COPYRIGHT
public static void initialize(IConfigManager configMgr, IRequestContextFactory reqContextFactory)
public static IConfigManager getConfigManager()
public static IRequestContextFactory getRequestContextFactory()
public static IServiceAdapter getAdapter(java.lang.Class adapterClass)