Java Programmer's Guide and Reference


Resource

A Resource is a JavaBean that represents an item in the telephony environment, such as a telephone. The Resources supported by this toolkit are:

Notes:

  1. The application must have the necessary properties initialized and must invoke the start() method before using the Resource.

  2. If the properties of a Resource are changed while the Resource is active (after the start() method is invoked), then the Resource must be stopped (using the stop() method) and restarted (using the start() method) to activate the new properties.

Properties

All properties associated with a Resource are related to the characteristics of the telephony resource that it represents. Each property is comprised of one or more of the following attributes:

Read (R)
Indicates that the bean provides a getProperty() method to read or query the specified property.

Write (W)
Indicates that the bean provides a setProperty(value) method to set or write the specified property for a particular action bean.

Bounded (B)
Indicates that the bean notifies other objects with a PropertyChange event (which contains the specific property, new value, and old value) whenever it determines that the value of the property has changed.

Transient (T)
Indicates that the setting of the value of the property is valid only during the instantiation of the bean. This attribute is mutually exclusive with the Persistent attribute.

Persistent (P)
Indicates that the setting of the value of the property is valid during the instantiation of the bean and also when it is saved using serialization (across instantiations). This attribute is mutually exclusive with the Transient attribute.

The properties associated with Resource beans are:

address

Attributes: R, W, B, P

The address property is used by an application to specify the telephone number of the Resource. This property, in conjunction with the terminal property, represents a unique telephony resource.

The address property:

DynamicAddresses

Attributes: R, W, B, P

The DynamicAddresses property is used to set the value of the addresses tag in the JTAPI getProvider request, as described in Table 1. The value should be a list of all the addresses to be used by the application, and not just the specific address used in this line resource.

DynamicACDAddresses

Attributes: R, W, B, P

The DynamicACDAddresses property is used to set the value of the acdaddresses tag in the JTAPI getProvider request as described in Table 1. The value should be a list of all the ACD addresses to be used by the application, and not just the specific address used in this line resource.

terminal

Attributes: R, W, B, P

The terminal property is used by an application to specify the telephone device of the Resource. This property, in conjunction with the address property, represents a unique telephony resource.

The terminal property:

user

Attributes: R, W, B, P

The user property is used by an application to specify the owner of the Resource. This property is equivalent to the JTAPI login parameter on the JtapiPeer.getProvider() method.

The user property:

lineResourceService

Attributes: R, W, B, P

The lineResourceService property is used by an application to specify the CallPath Enterprise Server (service) where you can access the Resource. This property is equivalent to the JTAPI service parameter on the JtapiPeer.getProvider() method.

The lineResourceService property:

ACD

Attributes: R, W, B, P

The ACD property is used by an application to specify an ACD that is associated with the Resource. This property is equivalent to the JTAPI Agent.getACDAddress().getName() attribute.

The ACD property:

identifier

Attributes: R, W, B, P

The identifier property is used by an application to specify the Agent Identifier that will be associated with the Resource. This property is equivalent to the JTAPI Agent.getIdentifier() attribute.

The identifier property:

agentPassword

Attributes: R, W, B, P

The agentPassword property is used by an application to specify the password associated with the Agent that is associated with the Resource. This property is equivalent to the JTAPI password attribute of the Agent object.

The agentPassword property:

restartOnFailure

Attributes: R, W, B, P

The restartOnFailure property is used by an application to specify whether the Resource should attempt to restart itself when it encounters a failure.

This property is supported by all Resources.

connectionItems

Attributes: R, B, T

The connectionItems property represents the ConnectionItems (calls) currently associated with the Resource. The information conveyed by these ConnectionItems is about the calls at the Resource.

This property is supported by all Resources.

agentItems

Attributes: R, B, T

The agentItems property represents the latest array of Agent information with the Resource. See Information Item for details about the type of information.

This property is supported by AgentResource only.

ACDItem

Attributes: R, T

The ACDItem property represents the latest ACD information with the Resource. See Information Item for details on the type of information.

This property is supported by ACDResource only.

Event sets

Event sets associated with Resource beans are:

lineResourceData

Listener: LineResourceDataListener

The lineResourceData event set indicates that the Resource is initialized and can be used by the application and the associated Actions.

This event set is supported by all Resources.

The LineResourceDataEvent contains information associated with each event in this event set. This event extends EventObject and has the following attributes:

The event in the lineResourceData event set is:

lineResourceDataInitialized

The lineResourceDataInitialized event is reported to all interested (registered) listeners when the Resource determines that it has finished initialization and is ready to be used by the application or associated Actions. This event is one of the primary ways to create a focus for an Action. Creating a focus is done by connecting this event to the associate(LineResourceDataEvent) method of an Action.

lineResourceStatus

Listener: LineResourceStatusListener

The lineResourceStatus event set indicates the availability status of the Resource, and can be used by the application to display the status of this Resource to the end user.

This event set is supported by all Resources.

The LineResourceStatusEvent contains information associated with each event in this event set. This event extends EventObject and has the following attributes:

The events in the lineResourceStatus event set are:

lineResourceStatusAvailable

The lineResourceStatus Available event is reported to all interested (registered) listeners when the Resource determines that all the components and attributes are initialized and available for use. Information, such as the ConnectionItems property, becomes available. The reason attribute is null.

lineResourceStatusTempUnavailable

The lineResourceStatusTempUnavailable event is reported to all interested (registered) listeners when the Resource determines that a necessary attribute or component is temporarily unavailable. Information, such as the ConnectionItems property, becomes temporarily unavailable. The reason attribute contains the reason that the Resource is currently unavailable.

lineResourceStatusUnavailable

The lineResourceStatusUnavailable event is reported to all interested (registered) listeners when the Resource determines that critical attributes or components are permanently unavailable. An action is required by the application to make the Resource available again (for example, change the configuration or Resource property and restart the Resource). The reason attribute contains the reason that the Resource is permanently unavailable.

connectionItem

Listener: ConnectionItemListener

The connectionItem event set indicates changes in the ConnectionItems of the Resource, and can be used by the application to display the status of the calls associated with the Resource to the end user.

This event set is supported by all Resources.

The ConnectionItemEvent contains information associated with each event in this event set. This event extends EventObject and has the following attributes:

The events in the connectionItem event set are:

connectionItemCreated

The connectionItemCreated event is reported to all interested (registered) listeners when the Resource determines that a new call is present. A ConnectionItem is added to the connectionItems property.

connectionItemChanged

The connectionItemChanged event is reported to all interested (registered) listeners when the Resource determines that an aspect of a call at the Resource has changed.

connectionItemRemoved

The connectionItemRemoved event is reported to all interested (registered) listeners when the Resource determines that a call is no longer present. The value of connectionItem attribute is no longer valid with the Resource; the ConnectionItem is removed from the connectionItems property.

connectionItemApplicationCallDataChanged

The connectionItemApplicationCallDataChanged event is reported to all interested (registered) listeners when the Resource determines that the application call data associated with a call has changed.

connectionItemV2

Listener: ConnectionItemListenerV2

The connectionItemV2 event set indicates changes in the ConnectionItems of the Resource, and can be used by the application to display the status of the calls associated with the Resource to the end user.

This event set is supported by all Resources.

The ConnectionItemV2Event contains information associated with each event in this event set. This event extends ConnectionItemListener and has the following attributes:

The events in the connectionItemV2 event set are:

connectionItemCreated

The connectionItemCreated event is reported to all interested (registered) listeners when the Resource determines that a new call is present. A ConnectionItem is added to the connectionItems property.

connectionItemChanged

The connectionItemChanged event is reported to all interested (registered) listeners when the Resource determines that an aspect of a call at the Resource has changed.

connectionItemRemoved

The connectionItemRemoved event is reported to all interested (registered) listeners when the Resource determines that a call is no longer present. The value of connectionItem attribute is no longer valid with the Resource; the ConnectionItem is removed from the connectionItems property.

connectionItemApplicationCallDataChanged

The connectionItemApplicationCallDataChanged event is reported to all interested (registered) listeners when the Resource determines that the application call data associated with a call has changed.

connectionItemAlerting

The connectionItemAlerting event is reported to all interested (registered) listeners when the Resource determines that a call is ringing at this resource.

connectionItemConnected

The connectionItemConnected event is reported to all interested (registered) listeners when the Resource determines that a call is connected at this resource.

connectionItemTransferred

The connectionItemTransferred event is reported to all interested (registered) listeners when the Resource determines that a call has been transferred from this resource.

connectionItemConferenced

The connectionItemConferenced event is reported to all interested (registered) listeners when the Resource determines that a call has been conferenced with this resource.

propertyChange

Listener: PropertyChangeListener

The propertyChange event set indicates that the value of a property has changed, and is reported for all properties that are bounded.

This event set is supported by all Resources.

The PropertyChangeEvent contains information associated with each event in this event set. This event extends EventObject and has the following attributes:

The event in the propertyChange event set is:

propertyChange

The propertyChange event is reported to all interested (registered) listeners when the Action determines that the value of a bounded property has changed. See Properties for the properties that are bound.

agentStatus

Listener: AgentStatusListener

The agentStatus event set indicates changes in the agent status of the AgentResource, and can be used by the application to reflect the agent status of the AgentResource to the end user.

This event set is supported by the AgentResource only.

The AgentItemEvent contains information associated with each event in this event set. This event extends EventObject and has the following attributes:

The events in the agentStatus event set are:

agentStatusLoggedIn

The agentStatusLoggedIn event is reported to all interested (registered) listeners when the Resource determines that the agent has logged into the associated ACD. The agentItem property of the Resource is updated with a new value.

agentStatusChanged

The agentStatusChanged event is reported to all interested (registered) listeners when the Resource determines that the status of the agent has changed.

agentStatusLoggedOut

The agentStatusLoggedOut event is reported to all interested (registered) listeners when the Resource determines that the agent has logged out of the associated ACD. The value of agentItem attribute (the agentItem property of the AgentResource) is no longer valid with the Resource.

ACDUpdate

Listener: ACDUpdateListener

The ACDUpdate event set indicates changes in the ACD information of ACDResource, and can be used by the application to reflect the ACD status of the ACDResource to the end user.

This event set is supported by the ACDResource only.

This event set uses the following events:

AgentItemEvent

The AgentItemEvent contains information associated with each event in this event set. This event extends EventObject and has the following attributes:

  • source

    The reference to the Resource that generated this event.

  • agentItem

    The reference to the AgentItem associated with the ACDResource that has changed.

ACDItemEvent

The ACDItemEvent contains information associated with each event in this event set. This event extends EventObject and has the following attributes:

  • source

    The reference to the Resource that generated this event.

  • ACDItem

    The reference to the ACDItem associated with the ACDResource that has changed.

The events in the ACDUpdate event set are:

ACDChanged

The ACDChanged event is reported to all interested (registered) listeners when the Resource determines that a change in the ACD information has occurred. This event uses the ACDItemEvent.

agentStatusLoggedIn

The agentStatusLoggedIn event is reported to all interested (registered) listeners when the Resource determines that an associated agent has logged in. The agentItems property of the Resource is updated with a new value. This event uses the AgentItemEvent.

agentStatusChanged

The agentStatusChanged event is reported to all interested (registered) listeners when the Resource determines that the status of an associated agent has changed. This event uses the AgentItemEvent.

agentStatusLoggedOut

The agentStatusLoggedOut event is reported to all interested (registered) listeners when the Resource determines that an associated agent has logged out. The value of agentItem attribute (an AgentItem of the agentItems property of the ACDResource) is no longer valid with Resource. This event uses the AgentItemEvent.

Methods

The methods associated with Resource beans are:

start()

The Resource components are initialized and activated when the start() method is invoked.

The following Resource properties must be set up before invoking this method:
Property Resource requiring the property
address All Resources
terminal Line and Agent Resources
user All Resources
lineResourceService All Resources
ACD Agent Resource
Note:
Optional if this is a Skills-Based Agent
identifier Agent Resource

To activate changes in the properties after the Resource is started, the Resource must be stopped and restarted.

start(LineResourceDataEvent)

The start(LineResourceDataEvent) method is a version of the start() method. The Resource components are initialized and activated when this method is invoked. This version uses certain components from the Resource it is connected to so that it can perform its initialization (the user, password and lineResourceService properties of Resource are ignored).

To use this method there must be at least one Resource that is started using the action() method. This Resource must be the beginning of the chain of connected Resources.

The following Resource properties must be set up before invoking this method:
Property Resource requiring the property
address All Resources
terminal Line and Agent Resources
ACD Agent Resource
Note:
Optional if this is a Skills-Based Agent
identifier Agent Resource

The component of the Resource that is shared is the JTAPI Provider object. The instance of the Provider must contain all the resources (Address and Terminal) in its space for this method to complete successfully.

To activate changes in the properties after the Resource is started, the Resource must be stopped and restarted.

stop()

The components of the Resource are cleaned up and deactivated when the stop() method is invoked.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]