com.avaya.ccs.api

## Interface MonitoredInteractionI

-     public interface MonitoredInteractionI

  The `MonitoredInteractionI` object represents an `InteractionI` at a `UserI` that is being monitored by a supervisor in the Contact Center (from the supervisors point of view).

  The `MonitoredInteractionI` object shares a subset of properties with the `InteractionI` object and only provides properties and methods that are appropriate for a supervisor who is monitoring their assigned users interactions. The `MonitoredInteractionI` objects methods allow the supervisor to invoke supervisor operations on the interactions that they are monitoring.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `bargeIn()` Requests that the Supervisor Barge-In on the contact that is represented by this `MonitoredInteractionI` object.
    `boolean` | `canBargeIn()`
    `boolean` | `canObserve()`
    `boolean` | `canWhisper()`
    `ContactCenterCodeI` | `getActivityCode()` The activity code that is currently set on the `InteractionI` that is represented by this `MonitoredInteractionI`.
    `java.lang.String` | `getAddress()` The address URI of the `UserI` associated with the `InteractionI` object that is represented by this `MonitoredInteractionI` object.
    `java.lang.String` | `getAddressName()` The name of the address returned by `getAddress()`.
    `java.lang.String` | `getCalledAddress()` The original destination address of the {code InteractionI} that is represented by this `MonitoredInteractionI`.
    `java.lang.String` | `getCalledAddressName()` The name of the address returned by `getCalledAddress()`.
    `java.lang.String` | `getCallingAddress()` The address that was the original source of the `InteractionI` that is represented by this `MonitoredInteractionI`.
    `java.lang.String` | `getCallingAddressName()` The name of the address returned by `getCallingAddress()`.
    `java.lang.String` | `getContactId()` The ID of the contact associated with the `InteractionI` that is represented by this `MonitoredInteractionI` object.
    `ContactType` | `getContactType()`
    `DataI` | `getData()` Retrieves the attached data that is associated with the contact of the `InteractionI` that is represented by this `MonitoredInteractionI`.
    `java.lang.String` | `getId()` A unique identifier for the `MonitoredInteractionI` object.
    `IntrinsicI` | `getIntrinsic(java.lang.String name)` Performs a lookup on the list returned from `getIntrinsics()` for an `IntrinsicI` object that matches the name supplied.
    `java.util.List<IntrinsicI>` | `getIntrinsics()` A list of `IntrinsicI` objects that provide additional information about the contact associated with the `InteractionI` object that is represented by this `MonitoredInteractionI`.
    `java.lang.String` | `getMainContactId()` If the contact associated with this `MonitoredInteractionI` object was created as the result of a consult operation (transfer or conference initiate), this method provides the ID of the main contact that is associated with this consult contact.
    `java.lang.String` | `getMonitoredUserId()`
    `java.lang.String` | `getOriginalDestination()` The original destination address used by the caller to reach the system, sometimes referred to as the DNIS (Dialed Number Identification Service).
    `java.lang.String` | `getSkillset()` The skillset if present of the `InteractionI` that is represented by this `MonitoredInteractionI`.
    `InteractionState` | `getState()` The `InteractionState` of the `InteractionI` that is represented by this `MonitoredInteractionI`.
    `StateReason` | `getStateReason()` The `StateReason` that represents the cause of the latest state transition that occurred on the `InteractionI` that is represented by this `MonitoredInteractionI`.
    `java.lang.String` | `getSupervisorId()`
    `java.lang.String` | `getUUI()` Retrieves the user-user info (UUI) stored on the contact associated with the `InteractionI` that is represented by this `MonitoredInteractionI`.
    `boolean` | `isMonitored()`
    `boolean` | `isMultimedia()`
    `void` | `observe()` Requests that the Supervisor observe the contact represented by this `MonitoredInteractionI` object.
    `void` | `whisper()` Requests that the Supervisor begin whispering to the `UserI` they are monitoring on the contact that is represented by this `MonitoredInteractionI` object.

- - ### Method Detail

    - #### canObserve

          boolean canObserve()
                      throws ObjectInvalidException

      Returns:
        `true` if the `MonitoredInteractionI` can be observed by the supervisor invoking the `observe()` method.
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### canBargeIn

          boolean canBargeIn()
                      throws ObjectInvalidException

      Returns:
        `true` if the supervisor can barge in to the `MonitoredInteractionI` by the invoking the `bargeIn()` method.
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### canWhisper

          boolean canWhisper()
                      throws ObjectInvalidException

      Returns:
        `true` if the supervisor can whisper to (coach) the user that is being monitored on this `MonitoredInteractionI` by invoking the `whisper()` method.
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### getId

          java.lang.String getId()

      A unique identifier for the `MonitoredInteractionI` object.

      This identifier will be the same as the `InteractionI` object at the `UserI` that is being monitored by this Supervisor. Identifier values are only guaranteed to be unique among objects of the same type. Client applications should not rely on the value of the ID property for anything other than uniquely identifying an instance of a particular object type, as the actual value of the ID property may be changed in future releases.

      This property is available for access after the application has received a `NotificationType.DELETE` notification for this `MonitoredInteractionI` object.

      Returns:
        id of the `MonitoredInteractionI` object

    - #### getAddress

          java.lang.String getAddress()
                               throws ObjectInvalidException

      The address URI of the `UserI` associated with the `InteractionI` object that is represented by this `MonitoredInteractionI` object. Please see `InteractionI.getAddress()` for further details on the format.
      Returns:
        a string representing the address of the `ResourceI` handling the `InteractionI` that is represented by this `MonitoredInteractionI`
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### getAddressName

          java.lang.String getAddressName()
                                   throws ObjectInvalidException

      The name of the address returned by `getAddress()`. Please see `InteractionI.getAddressName()` for further details on the format.
      Returns:
        a string representing the name of the address of the `ResourceI` handling the `InteractionI` that is represented by this `MonitoredInteractionI`
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### getCallingAddress

          java.lang.String getCallingAddress()
                                      throws ObjectInvalidException

      The address that was the original source of the `InteractionI` that is represented by this `MonitoredInteractionI`. Please see `InteractionI.getCallingAddress()` for further details on the address format.
      Returns:
        the address of the original source of the `InteractionI` represented by this `MonitoredInteractionI`
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### getCallingAddressName

          java.lang.String getCallingAddressName()
                                          throws ObjectInvalidException

      The name of the address returned by `getCallingAddress()`. Please see `InteractionI.getCallingAddressName()` for further details on the address name format.
      Returns:
        the address name of the original source of the `InteractionI` represented by this `MonitoredInteractionI`
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### getCalledAddress

          java.lang.String getCalledAddress()
                                     throws ObjectInvalidException

      The original destination address of the {code InteractionI} that is represented by this `MonitoredInteractionI`. Please see `InteractionI.getCalledAddress()` for further details on the address format.
      Returns:
        the address of the origination destination address or target of the `InteractionI` represented by this `MonitoredInteractionI`
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### getCalledAddressName

          java.lang.String getCalledAddressName()
                                         throws ObjectInvalidException

      The name of the address returned by `getCalledAddress()`. Please see `InteractionI.getCalledAddressName()` for further details on the address name format.
      Returns:
        the address name of the origination destination address of the `InteractionI` represented by this `MonitoredInteractionI`
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### getActivityCode

          ContactCenterCodeI getActivityCode()
                                      throws ObjectInvalidException

      The activity code that is currently set on the `InteractionI` that is represented by this `MonitoredInteractionI`. Please see `InteractionI.getActivityCode()` for further details on activity codes.
      Returns:
        the activity `ContactCenterCodeI` that has been set on this interaction or `null` if no code has been set.
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### getContactId

          java.lang.String getContactId()
                                 throws ObjectInvalidException

      The ID of the contact associated with the `InteractionI` that is represented by this `MonitoredInteractionI` object. Please see `InteractionI.getContactId()` for further details on the contact identifier.
      Returns:
        the contact id associated with the `InteractionI` that is represented by this `MonitoredInteractionI`
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### getContactType

          ContactType getContactType()
                              throws ObjectInvalidException

      Returns:
        the `ContactType` that is being handled by the `InteractionI` that is represented by this `MonitoredInteractionI`
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### getData

          DataI getData()
                 throws ObjectInvalidException

      Retrieves the attached data that is associated with the contact of the `InteractionI` that is represented by this `MonitoredInteractionI`. Please see `InteractionI.getData()` for further details.
      Returns:
        a `DataI` object that represents the data attached to the contact or `null` if no attached data exists on the contact.
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### getIntrinsics

          java.util.List<IntrinsicI> getIntrinsics()
                                            throws ObjectInvalidException

      A list of `IntrinsicI` objects that provide additional information about the contact associated with the `InteractionI` object that is represented by this `MonitoredInteractionI`.
      Returns:
        a list of `IntrinsicI objects`
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### isMonitored

          boolean isMonitored()
                       throws ObjectInvalidException

      Returns:
        `true` if this `InteractionI` that is represented by this `MonitoredInteractionI` is being observed by a supervisor
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### isMultimedia

          boolean isMultimedia()
                        throws ObjectInvalidException

      Returns:
        `true` if the `InteractionI` that is represented by this `MonitoredInteractionI` has a multimedia `ContactType`
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### getSkillset

          java.lang.String getSkillset()
                                throws ObjectInvalidException

      The skillset if present of the `InteractionI` that is represented by this `MonitoredInteractionI`. Please see `InteractionI.getSkillset()` for further details.
      Returns:
        the skillset if the interaction represented by this `MonitoredInteractionI` has been queued by the Contact Center, `null` if it has not been queued yet or is a personal interaction
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### getState

          InteractionState getState()

      The `InteractionState` of the `InteractionI` that is represented by this `MonitoredInteractionI`.

      Please see `InteractionI.getState()` for further details. This property is available for access after the application has received a `NotificationType.DELETE` notification for this `MonitoredInteractionI` object and will return `InteractionState.Dropped`.

      Returns:
        the current `InteractionState` of the `InteractionI` that is represented by this `MonitoredInteractionI`

    - #### getStateReason

          StateReason getStateReason()
                              throws ObjectInvalidException

      The `StateReason` that represents the cause of the latest state transition that occurred on the `InteractionI` that is represented by this `MonitoredInteractionI`.

      This property is available for access after the application has received a `NotificationType.DELETE` notification for this `MonitoredInteractionI` object.

      Returns:
        the current `StateReason` of the `InteractionI` that is represented by this `MonitoredInteractionI`.
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### getUUI

          java.lang.String getUUI()
                           throws ObjectInvalidException

      Retrieves the user-user info (UUI) stored on the contact associated with the `InteractionI` that is represented by this `MonitoredInteractionI`. Please see `InteractionI.getUUI()` for further details.
      Returns:
        the uui data stored on the `InteractionI` that is represented by this `MonitoredInteractionI`
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### getMainContactId

          java.lang.String getMainContactId()
                                     throws ObjectInvalidException

      If the contact associated with this `MonitoredInteractionI` object was created as the result of a consult operation (transfer or conference initiate), this method provides the ID of the main contact that is associated with this consult contact. Please see `InteractionI.getMainContactId()` for further details.
      Returns:
        the contact id of the main contact or `null` if the contact associated with this `MonitoredInteractionI` object is not a consult contact
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### getOriginalDestination

          java.lang.String getOriginalDestination()
                                           throws ObjectInvalidException

      The original destination address used by the caller to reach the system, sometimes referred to as the DNIS (Dialed Number Identification Service). Please see `InteractionI.getOriginalDestination()` for further details.
      Returns:
        original destination address of the `InteractionI` that is represented by this `MonitoredInteractionI`
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### getIntrinsic

          IntrinsicI getIntrinsic(java.lang.String name)
                           throws ObjectInvalidException,
                                  InvalidArgumentException

      Performs a lookup on the list returned from `getIntrinsics()` for an `IntrinsicI` object that matches the name supplied.
      Parameters:
        `name` - the name of the intrinsic to return
      Returns:
        an `IntrinsicI` object that matches the name argument or `null` if no intrinsic matches the name
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted
        `InvalidArgumentException` - if the name argument is `null` or an empty string

    - #### getSupervisorId

          java.lang.String getSupervisorId()
                                    throws ObjectInvalidException

      Returns:
        the identifier returned by `UserI.getId()` for the Supervisors `UserI` object
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### getMonitoredUserId

          java.lang.String getMonitoredUserId()
                                       throws ObjectInvalidException

      Returns:
        the identifier returned by `MonitoredUserI#getId` of the `MonitoredUserI` that is associated with this `MonitoredInteractionI` object
      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### observe

          void observe()
                throws ObjectInvalidException

      Requests that the Supervisor observe the contact represented by this `MonitoredInteractionI` object.

      An observe operation adds the Supervisor as an observing participant into an existing contact so they can observe an `InteractionI` of one of their assigned users. The Supervisor will be in receive only or listen only mode. They are not an active participant in the contact.

      If successful, a `NotificationType.NEW` notification will be received by the application indicating that a new `InteractionI` object has been created that represents the Supervisors observe participation in the contact. The `InteractionI.getParticipationReason()` of this new `InteractionI` will return `StateReason.Observe`. The `InteractionI.isMonitored()` property is set to `true` to indicate that the contact represented by this interaction is now being monitored. This notification is sent to the `InteractionListenerI` implementation that is supplied by the application as an argument to the `SessionI.openInteractions(com.avaya.ccs.api.InteractionListenerI)` method.

      If the `UserI` that is being observed by the Supervisor is within a `SessionI` then the `InteractionI` at the `UserI` that is represented by this `MonitoredInteractionI` will have `InteractionI.isMonitored()` property set to `true` identifying that the contact is being monitored. The `InteractionI.getRemoteParticipants()` of this `InteractionI` will be updated to reflect that the Supervisor `UserI` is now observing the contact. A `NotificationType.UPDATE` notification is sent to the `InteractionListenerI` implementation that is supplied by the application that is in control of this users `SessionI`.

      If a failure occurs a `NotificationType.ERROR` notification will be received. This notification is sent to the `MonitoredInteractionListenerI` implementation that is supplied by the application as an argument to the `MonitoredUserI.monitorInteractions(com.avaya.ccs.api.MonitoredInteractionListenerI)` method.

      Possible errors for this method are listed below. Most errors can be prevented by querying the `canObserve()` capability method to determine when it is possible to invoke this method. If the meaning of the error code in the context of this method differs significantly from the generic description given for that error code, then a context-specific meaning is given.

      Possible Errors
      Error Codes | Context Specific Meaning / Notes
      --- | ---
      `ErrorCode.DestinationStateInvalid` | The `MonitoredInteractionI` is not in a state that allows observing of the contact
      `ErrorCode.InvalidRequest` | The `MonitoredInteractionI` represents a non-skillset contact but the supervisor has not been granted permission to observe non-skillset contacts
      `ErrorCode.MissingContactType` | The `MonitoredInteractionI` has a `ContactType` that the Supervisor is not administered with
      `ErrorCode.NoAgentPresent` | The Supervisor is not logged in to the Contact Center
      `ErrorCode.OperationNotSupported`
      `ErrorCode.OutOfService`

      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### bargeIn

          void bargeIn()
                throws ObjectInvalidException

      Requests that the Supervisor Barge-In on the contact that is represented by this `MonitoredInteractionI` object.

      The Barge-In operation is only possible on `MonitoredInteractionI` objects that the Supervisor is currently either;

      - observing through `observe()` or
      - whispering into through `whisper()`

      The Barge-In operation upgrades the Supervisor to a full active participant on the contact that they were either observing or whispering into.

      If successful, a `NotificationType.UPDATE` notification will be received by the application indicating that the `InteractionI` object that represented the Supervisors observe or whisper participation has been updated to reflect the Supervisors barge-in participation on the contact. The `InteractionI.getParticipationReason()` of the updated `InteractionI` will return `StateReason.BargeIn`. This notification is sent to the `InteractionListenerI` implementation that is supplied by the application as an argument to the `SessionI.openInteractions(com.avaya.ccs.api.InteractionListenerI)` method.

      If a failure occurs a `NotificationType.ERROR` notification will be received. This notification is sent to the `MonitoredInteractionListenerI` implementation that is supplied by the application as an argument to the `MonitoredUserI.monitorInteractions(com.avaya.ccs.api.MonitoredInteractionListenerI)` method.

      Possible errors for this method are listed below. Most errors can be prevented by querying the `canBargeIn()` capability method to determine when it is possible to invoke this method. If the meaning of the error code in the context of this method differs significantly from the generic description given for that error code, then a context-specific meaning is given.

      Possible Errors
      Error Codes | Context Specific Meaning / Notes
      --- | ---
      `ErrorCode.InvalidRequest` | The `MonitoredInteractionI` represents a non-skillset contact but the supervisor has not been granted permission to barge-in on non-skillset contacts
      `ErrorCode.MissingContactType` | The `MonitoredInteractionI` has a `ContactType` that the Supervisor is not administered with
      `ErrorCode.NoAgentPresent` | The Supervisor is not logged in to the Contact Center
      `ErrorCode.OperationNotSupported`
      `ErrorCode.OutOfService`

      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted

    - #### whisper

          void whisper()
                throws ObjectInvalidException

      Requests that the Supervisor begin whispering to the `UserI` they are monitoring on the contact that is represented by this `MonitoredInteractionI` object.

      A Whisper operation is only possible on `MonitoredInteractionI` objects that the Supervisor is currently observing. The Whisper operation allows the Supervisor to communicate with the `UserI` that they have been observing on the contact. This is also known as coaching. The Supervisor cannot communicate with other parties present on the contact.

      If successful, a `NotificationType.UPDATE` notification will be received by the application indicating that the `InteractionI` object that represented the Supervisors observe participation has been updated to reflect the Supervisors whisper participation on the contact. The `InteractionI.getParticipationReason()` of the updated `InteractionI` will return `StateReason.Whisper`. This notification is sent to the `InteractionListenerI` implementation that is supplied by the application as an argument to the `SessionI.openInteractions(com.avaya.ccs.api.InteractionListenerI)` method.

      If a failure occurs a `NotificationType.ERROR` notification will be received. This notification is sent to the `MonitoredInteractionListenerI` implementation that is supplied by the application as an argument to the `MonitoredUserI.monitorInteractions(com.avaya.ccs.api.MonitoredInteractionListenerI)` method.

      Possible errors for this method are listed below. Most errors can be prevented by querying the `canWhisper()` capability method to determine when it is possible to invoke this method. If the meaning of the error code in the context of this method differs significantly from the generic description given for that error code, then a context-specific meaning is given.

      Possible Errors
      Error Codes | Context Specific Meaning / Notes
      --- | ---
      `ErrorCode.FeatureError` | The `observe()` API was not invoked before `whisper()`
      `ErrorCode.MissingContactType` | The `MonitoredInteractionI` has a `ContactType` that the Supervisor is not administered with
      `ErrorCode.NoAgentPresent` | The Supervisor is not logged in to the Contact Center
      `ErrorCode.OperationNotSupported`
      `ErrorCode.OutOfService`

      Throws:
        `ObjectInvalidException` - if the `MonitoredInteractionI` object has been deleted