Package com.avaya.clientservices.presence

## Class PresenceConfiguration

- java.lang.Object
- - com.avaya.clientservices.presence.PresenceConfiguration

-     public class PresenceConfiguration
      extends java.lang.Object

  User configuration information for the presence service. This class provides configuration and preference data for the presence service features.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PresenceConfiguration()` | A default constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `long` | `getAwayTimeout()` | The user inactivity timeout period in milliseconds.
    `java.lang.String` | `getServerAddress()` | Configured presence server address.
    `boolean` | `isEnabled()` | Indicates whether the presence service is enabled.
    `boolean` | `isPresenceUpdateInBackgroundEnabled()` | Indicates whether contact presence updates should be monitored and reported even when mobile platform application is not visible.
    `boolean` | `isSendAllCallsOnDoNotDisturb()` | Indicates a link between "Do Not Disturb" presence state and "Send All Calls" call service feature.
    `void` | `setAwayTimeout​(long awayTimeout)` | Sets the timeout for the user inactivity timer.
    `void` | `setEnabled​(boolean enabled)` | Enables or disables the presence service.
    `void` | `setPresenceUpdateInBackgroundEnabled​(boolean presenceUpdateInBackgroundEnabled)` | Enables or disables contact presence monitoring when mobile platform application is not visible.
    `void` | `setSendAllCallsOnDoNotDisturb​(boolean sendAllCallsOnDoNotDisturb)` | Sets a link between "Do Not Disturb" presence state and "Send All Calls" call service feature.
    `void` | `setServerAddress​(java.lang.String serverAddress)` | An optional parameter to specify the presence server address.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PresenceConfiguration

          public PresenceConfiguration()

      A default constructor.

  - ### Method Detail

    - #### isEnabled

          public boolean isEnabled()

      Indicates whether the presence service is enabled.
      Returns:
        true if the presence service is enabled, false otherwise.

    - #### setEnabled

          public void setEnabled​(boolean enabled)

      Enables or disables the presence service.
      Parameters:
        `enabled` - true if presence support should be enabled, false otherwise.

    - #### getServerAddress

          public java.lang.String getServerAddress()

      Configured presence server address.
      Returns:
        presence server address.
      See Also:
        `setServerAddress(String)`

    - #### setServerAddress

          public void setServerAddress​(java.lang.String serverAddress)

      An optional parameter to specify the presence server address.

      If configured, this server will be used as the domain in the request URI for all presence-related messages. Otherwise the address will be discovered automatically.

      Parameters:
        `serverAddress` - The presence server address to use.

    - #### isSendAllCallsOnDoNotDisturb

          public boolean isSendAllCallsOnDoNotDisturb()

      Indicates a link between "Do Not Disturb" presence state and "Send All Calls" call service feature.
      Returns:
        true if the link between "Do Not Disturb" presence state and "Send All Calls" call service feature is enabled, false otherwise.
      See Also:
        `setSendAllCallsOnDoNotDisturb(boolean)`

    - #### setSendAllCallsOnDoNotDisturb

          public void setSendAllCallsOnDoNotDisturb​(boolean sendAllCallsOnDoNotDisturb)

      Sets a link between "Do Not Disturb" presence state and "Send All Calls" call service feature.

      If the link is enabled and "Send All Calls" feature is available, the following behavior applies. Once the presence state of the user changes to "Do not Disturb", "Send All Calls" is automatically switched on. If the presence state of the user changes from "Do not Disturb" to any other state, "Send All Calls" is automatically switched off.

      Parameters:
        `sendAllCallsOnDoNotDisturb` - boolean value to enable or disable a link between "Do Not Disturb" presence state and "Send All Calls" call service feature.

    - #### isPresenceUpdateInBackgroundEnabled

          public boolean isPresenceUpdateInBackgroundEnabled()

      Indicates whether contact presence updates should be monitored and reported even when mobile platform application is not visible.
      Returns:
        true if the presence updates in background are enabled, false otherwise.
      See Also:
        `setPresenceUpdateInBackgroundEnabled(boolean)`

    - #### setPresenceUpdateInBackgroundEnabled

          public void setPresenceUpdateInBackgroundEnabled​(boolean presenceUpdateInBackgroundEnabled)

      Enables or disables contact presence monitoring when mobile platform application is not visible.

      Note: It is not recommended to enable this option since in most cases contact presence updates are not visible due to the application is running in background and active presence subscriptions result in useless network traffic and battery drain. This option might be useful for a specific setup where contact presence indicators are still visible even when the application is minimized.

      Note: Presence updates are disabled in background by default.

      Parameters:
        `presenceUpdateInBackgroundEnabled` - boolean true if presence update subscriptions should remain active in background, false otherwise.

    - #### setAwayTimeout

          public void setAwayTimeout​(long awayTimeout)

      Sets the timeout for the user inactivity timer.

      Inactivity timer is used to automatically change the user's presence state to 'away' if the user is inactive, i.e. not using the device with the installed application. When the timer fires, the user's presence is set to the 'away' state. If zero value is specified, the inactivity timer is disabled.

      Parameters:
        `awayTimeout` - Timeout in milliseconds.

    - #### getAwayTimeout

          public long getAwayTimeout()

      The user inactivity timeout period in milliseconds.
      Returns:
        Away timeout in milliseconds.