OracleAS Personalization Java API Reference
10g Release 2 (10.1.2)

B14053-01


oracle.dmt.op.re.reapi.rt
Class REProxyManager

java.lang.Object
  extended byoracle.dmt.op.re.reapi.rt.REProxyManager


public final class REProxyManager
extends java.lang.Object

A singleton class that manages and provides access to REProxyRT objects. Only one instance of this class is available in each JVM and it is loaded automatically. Each instance of REProxyManager encapsulates a proxy pool that holds and manages REProxyRT objects. The proxy objects in the pool are identified by their unique names.

See Also:
REProxyRT

Method Summary
static REProxyRT createProxy(java.lang.String name, java.lang.String dbURL, java.lang.String userName, java.lang.String passWord, int cacheSize, int interval)
Creates an object of class REProxyRT.
static REProxyRT createProxy(java.lang.String name, java.lang.String dbURL, java.lang.String userName, java.lang.String passWord, int cacheSize, int interval, int timeout)
Creates an object of class REProxyRT.
static void destroyAllProxies()
Destroys all existing REProxyRT objects and cleans the proxy pool that is mastered by class REProxyManager.
static void destroyProxy(java.lang.String name)
Destroys the specified REProxyRT object and removes it from the proxy pool that is mastered by class REProxyManager.
static REProxyRT getProxy(java.lang.String name)
Gets an instance of the specified REProxyRT.

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

createProxy

public static REProxyRT createProxy(java.lang.String name,
                                    java.lang.String dbURL,
                                    java.lang.String userName,
                                    java.lang.String passWord,
                                    int cacheSize,
                                    int interval,
                                    int timeout)
                             throws StringTooLargeException,
                                    REProxyInitException
Creates an object of class REProxyRT. The proxy connects to the specified RE database through a JDBC connection pool and processes recommendation requests using the specified RE.

The proxy object possesses a DataCollectionCache and a connection pool. The DataCollectionCache stores the customer profile data temporarily and then periodically archives the data in the RE database. The connection pool provides pooled connections required by all recommendation methods.

Parameters:
name - a unique name of the new REProxyRT object
dbURL - the URL of the database this proxy will connect to
userName - the login name
passWord - the login password
cacheSize - the cache size in Kb
interval - the cache archive interval in milliseconds
timeout - in seconds, timeout allows foreach SQL query to run underneath REAPI calls. If the time limit is exceeded, it will throw an ErrorExecutingRE exception.
Throws:
StringTooLargeException - if the input string is too long
REproxyInitException - if the initialization of the proxy fails
REProxyInitException
Since:
9.0.4

createProxy

public static REProxyRT createProxy(java.lang.String name,
                                    java.lang.String dbURL,
                                    java.lang.String userName,
                                    java.lang.String passWord,
                                    int cacheSize,
                                    int interval)
                             throws StringTooLargeException,
                                    REProxyInitException
Creates an object of class REProxyRT. The proxy connects to the specified RE database through a JDBC connection pool and processes recommendation requests using the specified RE.

The proxy object possesses a DataCollectionCache and a connection pool. The DataCollectionCache stores the customer profile data temporarily and then periodically archives the data in the RE database. The connection pool provides pooled connections required by all recommendation methods.

Parameters:
name - a unique name of the new REProxyRT object
dbURL - the URL of the database this proxy will connect to
userName - the login name
passWord - the login password
cacheSize - the cache size in Kb
interval - the cache archive interval in milliseconds
Throws:
StringTooLargeException - if the input string is too long
REproxyInitException - if the initialization of the proxy fails
REProxyInitException

getProxy

public static REProxyRT getProxy(java.lang.String name)
                          throws REProxyInitException
Gets an instance of the specified REProxyRT.
Parameters:
name - the name of the REProxyRT object
Returns:
the named REProxyRT object
Throws:
REProxyInitException - if the proxy object is not initiated properly

destroyProxy

public static void destroyProxy(java.lang.String name)
Destroys the specified REProxyRT object and removes it from the proxy pool that is mastered by class REProxyManager. This method forcefully destroys the named proxy regardless of its active status. Does nothing if the name is empty or the named proxy does not exist.
Parameters:
name - the name of the REProxyRT object; must be unique

destroyAllProxies

public static void destroyAllProxies()
Destroys all existing REProxyRT objects and cleans the proxy pool that is mastered by class REProxyManager. This method is extremely violent and forcefully destroys all proxy objects regardless of their active status.

OracleAS Personalization Java API Reference
10g Release 2 (10.1.2)

B14053-01


Copyright © 2005 Oracle. All Rights Reserved.