Java Programmer's Guide and Reference


Action

An Action bean is a JavaBean that performs a specific telephony function or sequence of functions. The Action beans supported by this toolkit are:

Note:
Normally, the application must create an application connection between an event from a Resource or other application object and the appropriate associate() method before the application can use the Action. This connection establishes the focus of the Action. However, if the application is connecting the actionStatus event from the source Action to the action(ActionStatusEvent) method of the target Action, the content of the event is used to perform the feature associated with the Action.

Properties

All properties associated with an Action are related to the invocation of an action() method. These properties:

Properties have attributes that affect the behavior of the bean. Properties, which can be monitored and controlled by the application, are 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 Action beans are:

ANI

Attributes: R, B, T

This property represents the latest ANI (Automatic Numbering Identification) associated with the Action. If there are multiple calls with ANI information at the Action, this property will contain the last known value.

Note:
This property is supported by KeyCallData Action only.

applicationCallData

Attributes: R, B, T

This property represents the latest application call data associated with the Action. If there are multiple calls with application call data information at the Action, this property will contain the last known value.

Note:
This property is supported by KeyCallData Action only.

applicationCallDataToUse

Attributes: R, W, B, T

This property is used to associate application information (data) with the ConnectionItem (call) being used or created when an action() or action(ActionStatusEvent) method is invoked.

After the action() or action(ActionStatusEvent) method is invoked, this property is reset by the Action. After the application information (data) is associated with the ConnectionItem (call), the application should control this attribute from the applicationCallData property of the ConnectionItem.

Note:
This property is supported by all Actions except for the following:
  • AgentLogon
  • AgentLogoff
  • AgentReady
  • AgentNotReady
  • AgentNotReadyAfterWork
  • KeyCallData

associatedConnectionToUse

Attributes: R, W, B, T

This property is used by an application to specify a ConnectionItem. It should be used in conjunction with the connectionToUse property when performing the Action (invoking the action() method).

If this property is not set by the application before the action() method is invoked, the Action selects a valid ConnectionItem to use when performing the action() method. For the invocation of the action() method to be successful, the application should use one of the ConnectionItems from the usableAssociatedConnectionItems property when setting this property.

Note:
This property is supported by the following Actions:
  • ConferenceCall
  • TransferCall
  • RetrieveCall

calledNumber

Attributes: R, B, T

This property represents the latest calledNumber associated with the Action. If there are multiple calls with called number information at the Action, this property will contain the last known value.

Note:
This property is supported by KeyCallData Action only.

connectionToUse

Attributes: R, W, B, T

This property is used by an application to specify the ConnectItem to use when performing the Action (invoking the action() method). If this property is not set by the application before the action() method is invoked, the Action selects a valid ConnectionItem to use when performing the action() method.

For the invocation of the action() method to be successful, the application should use one of the ConnectionItems from the usableConnectionItems property when setting this property.

Note:
This property is supported by all Actions except for the following:
  • MakeCall
  • AgentLogon
  • AgentLogoff
  • AgentReady
  • AgentNotReadyAfterWork

consultPurpose

Attributes: R, W, B, P

This property indicates the intention of the ConsultCall; whether to transfer or to conference. This property is only required for certain telephony switches. Consult the CallPath switch reference documentation for your switch to see if consultPurpose applies to your environment. Table 26 shows the possible values for this parameter:

Table 26. consultPurpose
Type Value Description
TRANSFER_AND_CONFERENCE 0 This value indicates consulting in order to transfer or conference.
TRANSFER 1 This value indicates consulting with the intention to transfer.
CONFERENCE 2 This value indicates consulting with the intention to conference.

Note:
These constant values are defined in the com.ibm.telephony.beans.ConnectionItem class as public constants. For example, use ConnectionItem.TRANSFER in your code.

If using the ConsultCall Action, it is recommended that the application set this property before invoking the action() or action(ActionStatusEvent) method. The default purpose for this property (if it not set) is ConsultCall.TRANSFER_AND_CONFERENCE.

Because this property is persistent, it can be set with a value and retained with the Action until it is changed.

Note:
This property is supported by the ConsultCall Action.

destination

Attributes: R, W, B, P

This property is used by the application to specify the destination (address) of the Action when the action() or action(ActionStatusEvent) method is invoked.

This property is persistent. Its value is retained with the Action until the value is changed.

Note:
This property is supported by following Actions:
  • MakeCall
  • ConsultCall
  • BlindConferenceCall
  • BlindTransferCall

DNIS

Attributes: R, B, T

This property represents the latest DNIS (Dialed Number Identification Service) associated with the Action. If there are multiple calls with DNIS information at the Action, this property will contain the last known value.

Note:
This property is supported by KeyCallData Action only.

lastFailedStatusReason

Attributes: R, B, T

This property indicates why the action() or action(ActionStatusEvent) method failed the last time it was invoked.

Note:
This property is supported by all Actions.

usableAssociatedConnectionItems

Attributes: R, B, T

This property indicates which ConnectionItems are valid for use with the ConnectionItems of the usableConnectionItems property. Each ConnectionItem in this array has attributes (for example, state and associated Resource) that, with the ConnectionItems from the usableConnectionItems property, ensure a high probability that the action() method succeeds.

Note:
This property is supported by following Actions:
  • ConferenceCall
  • TransferCall
  • RetrieveCall

usableConnectionItems

Attributes: R, B, T

This property indicates which ConnectionItems are valid when invoking the action() method. Each ConnectionItem in this array has attributes (for example, state and associated Resource) that ensure a high probability that the action() method succeeds.

This property should be used when selecting the ConnectionItem to use for setting the connectionToUse property.

Note:
This property is supported by all Actions except for the following:
  • MakeCall
  • AgentLogon
  • AgentLogoff
  • AgentReady
  • AgentNotReady
  • AgentNotReadyAfterWork

waitForAnswer

This property can be set to true or false. If it is set to true, the ConsultCall bean will wait for the called party to answer before sending the ActionDone event. If set to false, the bean will send the ActionDone event as soon as the consult request is successful. For example, assume waitForAnswer is set to true. If you consult with Party A, and Party A does not answer immediately, the ActionDone event will not send until Party A actually answers. If waitForAnswer is false, the ActionDone event will send while Party A's phone is ringing.

Event sets

Event sets associated with Action beans are:

actionAvailable

Listener: ActionAvailableListener

This event set indicates the availability of the Action to perform its function.

Example: This event set is connected to an AWT (Abstract Windowing Toolkit) button. The AWT button is automatically enabled and disabled depending on the events reported by this event set.

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

The events and event descriptions in the actionAvailable event set are:

actionDisabled

This event is reported to all interested (registered) listeners when the Action determines that it cannot complete successfully. The connectionItems attribute of this event does not contain any entries and the reason attribute is null.

actionEnabled

This event is reported to all interested (registered) listeners when the Action determines that it can complete successfully. The connectionItems attribute of this event contains one ConnectionItem and the reason attribute is null.

actionAdvancedEnabled

This event is reported to all interested (registered) listeners when the Action determines that it can complete successfully. The connectionItems attribute of this event contains more than one ConnectionItem and the reason attribute is null.

actionPermanentDisabled

This event is reported to all interested (registered) listeners when the Action determines that it is permanently disabled until the Action's association with Resource is reset or changed. The connectionItems attribute of this event does not contain any entries and the reason attribute contains the reason the Action is permanently disabled.

This event is reported to all interested (registered) listeners when the Action determines that it can complete successfully. The connectionItems attribute of this event contains more than one ConnectionItem and the reason attribute is null.

actionStatus

Listener: ActionStatusListener

This event set indicates the status of the invocation of a version of an action() method for the Action.

The application connection between this event set and the action(ActionStatus Event) method is how you create script or flow diagram applications using these beans.

Example: This event set is connected to a text field of an application. This text field displays the results of the invocation of the Actions in the application.

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

Note:
When any of these events are connected to the action(ActionStatusEvent) method, the method uses the ConnectionItem from the event and ignores its current association with a Resource or ConnectionItem.

Following are the events and event descriptions in the actionStatus event set:

actionDoing

This event is reported to all interested (registered) listeners when the Action determines that an Action() method has been invoked and is in the process of being executed. The reason attribute is null.

actionDone

This event is reported to all interested (registered) listeners when the Action determines that the invocation of an Action() method has completed successfully. The connectionItem attribute of this event contains the ConnectionItem involved in the execution of the Action and the reason attribute is null.

On the DisconnectCall and TransferCall Actions, the actionDone event should not be connected to the action(ActionStatusEvent) method of another Action, because the ConnectionItem in the event is no longer valid.

actionFailed

This event is reported to all interested (registered) listeners when the Action determines that the invocation of an Action() method has failed at some point during execution.

The connectionItem attribute of this event contains the ConnectionItem involved in the execution of the Action and the reason attribute contains the reason this invocation failed.

propertyChange

Listener: PropertyChangeListener

This event set indicates that the value of a property has changed. This event set is reported only for bounded properties.

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

The event and event description in the propertyChange event set is:

propertyChange

This 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.

Methods

The methods associated with Action beans are:

action()

When the action() method is invoked, the specific function associated with the Action is executed.

This version uses the actual connectionToUse property as it was set up by the Action or application.

You must set up the following Action properties before invoking this method:

action(ActionStatusEvent)

This method is a version of the action() method. When this method is invoked, the specific function associated with the Action is executed. In this version, the method uses the ConnectionItem attribute from the ActionStatusEvent parameter as the connectionToUse property when executing the function of the Action.

The application connection between this method and the actionStatus event set is the way you create script or flow diagram applications using these beans.

The actionDone event from the DisconnectCall and TransferCall Actions should not be connected to the action(ActionStatusEvent) method of another Action, because the ConnectionItem in the event would no longer be valid.

associate(ConnectionItem)

This method is a version of the associate() method. This method associates (connects) a specific ConnectionItem with the Action. When you invoke this method, you focus the Action on the particular ConnectionItem (the focus of the properties, the event sets, and the action() method will all be associated with the ConnectionItem). This method is used when an application is allowing the user to change the focus of a set of Actions based on a set of ConnectionItems (calls).

The association between the ConnectionItem and the Action remains even after the ConnectionItem is no longer valid. The application must change the association (focus) under these conditions.

Note:
This property is supported by all Actions, except for the following:
  • AgentLogon
  • AgentLogoff
  • AgentReady
  • AgentNotReady
  • AgentNotReadyAfterWork

associate(LineResource)

This method is a version of the associate() method. This method associates (connects) a specific Resource with the Action. When you invoke this method, you focus the Action on the Resource (the focus of the properties, the event sets, and the action() method will be associated with all ConnectionItems associated with the Resource). This method is used when an application is allowing the user to change the focus of a set of Actions based on a set of Resources (for example, telephone numbers).

associate(LineResourceDataEvent)

This method is a version of the associate() method. This method associates (connects) a given Resource from the lineResourceDataInitialized event (when the Resource is ready to be used) with the Action. When you invoke this method, you focus the Action on the particular Resource (the focus of the properties, the event sets, and the action() method will be associated with all ConnectionItems associated with the Resource). This method is used when an application has started the Resource and the Resource is notifying the associated Action that it is ready for processing.


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