|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.omsdk.qil.QILFactory
Entry point of Queued Interaction Layer.
The QILFactory
instantiates internal classes and makes them available through
interfaces. You do not instantiate objects directly in your code.
The QILFactory
object is a singleton. This means that only one instance of
the QILFactory
object exists at runtime.
The QILFactory
manages both the library initialization and release, and
connections to the Interaction Server and the Configuration Layer.
Before you get a QILFactory
instance, first initialize the open media common library by creating
an OMSDKConnector
object. This object manages the connections to servers that are required
in order to use the QIL library.
To initialize the OMSDKConnector
class:
InitializationServices
instance for the QIL library
by calling the static getInitializationServices()
method.
InitializationParameters
object for initializing the Connector.
OMSDKConnector.initialize()
method.
The following code snippet shows how to initialize the OMSDKConnector
class:
InitializationServices qilInitServices = QILFactory.getInitializationServices();
InitializationParameters ip = new InitializationParameters(
"ConfigServerPrimaryHost",
"ConfigServerPrimaryPort",
"back up port",
"back up host",
"ApplicationName",
data.getReconnectionPeriod(),
data.getReconnectionAttempts());
ip.addInitializationServices(qilInitServices);
OMSDKConnector.initialize(ip);
OMSDKConnector connector = OMSDKConnector.getInstance();
You can now initialize the QIL library.
Create a QILInitializationParameters
object, then call the
QILFactory.
initialize
static method, as shown in the following code snippet:
// Get initialization parameters
QILInitializationParameters initParameters = new QILInitializationParameters();
// Initialize
QILFactory.initialize(initParameters);
Then, to get a QILFactory
instance, call the QILFactory.
getQILFactory()
static method, as shown here:
QILFactory qilFactory = QILFactory.getQILFactory();
Note: When terminating your application, release your QILFactory
instance by calling
the releaseFactory()
method to properly release objects made available through this interface.
Use the QILFactory
class to access information about:
getBusinessAttribute()
.
getQueue()
and getAllQueues()
.
Method Summary | |
abstract void |
changeOperationalMode(QILOperationalMode newMode)
Modifies the QIL application's operational mode. |
abstract java.util.Collection |
getAllQueues()
Returns a collection of all the queues defined in the Configuration Layer in the same tenant as the current application. |
abstract BusinessAttribute |
getBusinessAttribute(java.lang.String name)
Returns the business attribute defined in the Configuration Layer with the specified name. |
static InitializationServices |
getInitializationServices()
Returns a com.genesyslab.omsdk.commons.InitializationServices containing service information for initializing the QIL library. |
abstract QILInteractionManager |
getInteractionManager()
Returns the interaction manager. |
abstract BusinessAttribute |
getInteractionSubtypes()
Returns the "Interaction Subtype" business attribute defined in the Configuration Layer for the current application's tenant. This business attribute contains all the interaction subtypes defined for this tenant. |
abstract BusinessAttribute |
getInteractionTypes()
Returns the "Interaction Type" business attribute defined in the Configuration Layer in the current application's tenant. This business attribute contains all the interaction types defined for this tenant. |
abstract BusinessAttribute |
getMediaTypes()
Returns the "Media Type" business attribute defined in the Configuration Layer in the current application's tenant. |
abstract QILOperationalMode |
getOperationalMode()
Returns the QIL application's operational mode. |
static QILFactory |
getQILFactory()
Returns the instance of QILFactory . |
abstract QILQueue |
getQueue(java.lang.String id)
Returns the queue with the specified ID, if it exists. |
static void |
initialize(QILInitializationParameters config)
Initializes the QILFactory instance with the specified parameters. |
static void |
releaseFactory()
Releases this instance and all the objects made available through this interface. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static QILFactory getQILFactory()
QILFactory
.
Note: Before calling this method, initialize the library as shown in this code snippet.
QILUninitializedException
- exception thrown if the factory is not already initialized.initialize
public static void initialize(QILInitializationParameters config) throws QILInitializationException
QILFactory
instance with the specified parameters.
Use this method as shown in this code snippet.
QILFactory
is already initialized, no reinitialization occurs.
config
- initialization parameters.
NOTE: This parameter is reserved for future use. It has no effect in the current version, but null value is not allowed here.
QILInitializationException
- exception thrown if some internal service failed to initialize.public static void releaseFactory()
public abstract QILQueue getQueue(java.lang.String id) throws QILRequestFailedException
The queue ID corresponds to the queue name defined in the Configuration Layer for the current application's tenant.
id
- ID of the queue to return.
QILRequestFailedException
- exception thrown if the request failed. To get
specific reasons for this error, see the subclasses of QILRequestFailedException
.public abstract java.util.Collection getAllQueues() throws QILRequestFailedException
QILQueueListener
to QILQueue
objects.
QILQueue
.
QILRequestFailedException
- exception thrown if the request failed. To get
specific reasons for this error, see the subclasses of QILRequestFailedException
.QILQueue.addQueueListener()
,
QILQueueMonitorStatusEvent
public abstract BusinessAttribute getBusinessAttribute(java.lang.String name) throws QILRequestFailedException
name
- the name of the attribute to be found.
QILRequestFailedException
- exception thrown if the request failed. To get
specific reasons for this error, see the subclasses of QILRequestFailedException
.public abstract BusinessAttribute getMediaTypes() throws QILRequestFailedException
Calling this method is equivalent to calling the getBusinessAttribute(java.lang.String)
as shown here:
BusinessAttribute myMediaTypes = qilFactory.getBusinessAttribute("Media Type");
Media Type
business attribute.
QILRequestFailedException
- exception thrown if the request failed. To get
specific reasons for this error, see the subclasses of QILRequestFailedException
.QILInteraction.getMediaType()
public abstract BusinessAttribute getInteractionTypes() throws QILRequestFailedException
Calling this method is equivalent to calling the getBusinessAttribute(java.lang.String)
as shown here:
BusinessAttribute myInteractionTypes = qilFactory.getBusinessAttribute("Interaction Type");
QILRequestFailedException
- exception thrown if the request failed. To get
specific reasons for this error, see the subclasses of QILRequestFailedException
.QILInteraction.getType()
public abstract BusinessAttribute getInteractionSubtypes() throws QILRequestFailedException
Calling this method is equivalent to calling the getBusinessAttribute(java.lang.String)
as shown here:
BusinessAttribute myInteractionSubtypes = qilFactory.getBusinessAttribute("Interaction Subtype");
QILRequestFailedException
- exception thrown if the request failed. To get
specific reasons for this error, see the subclasses of QILRequestFailedException
.QILInteraction.getSubtype()
public static InitializationServices getInitializationServices()
public abstract QILInteractionManager getInteractionManager() throws QILOperationalModeRestrictionException
QILOperationalMode.SUPERVISOR_MODE
mode.
QILOperationalModeRestrictionException
- exception thrown if the QIL application's mode does not allow the use of this method.QILInteractionManager
,
changeOperationalMode(QILOperationalMode)
,
getOperationalMode()
public abstract QILOperationalMode getOperationalMode()
public abstract void changeOperationalMode(QILOperationalMode newMode) throws QILUnsuccessfulModeChangeException
newMode
- new mode
QILUnsuccessfulModeChangeException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |