Class NotificationSDKServerSettings

java.lang.Object
com.vasco.digipass.sdk.utils.notification.server.NotificationSDKServerSettings

public class NotificationSDKServerSettings extends Object
The NotificationSDKServerSettings object encompasses the NotificationSDKServer object's specific settings. It must be provided to the NotificationSDKServer(NotificationSDKServerCredentials credentials, NotificationSDKServerSettings settings, NotificationSDKServerCallbacks callbacks) constructor.

If your organization operates behind a firewall that restricts the traffic to or from the Internet, a proxy can be configured to communicate to the various notification servers.

  • Field Details

    • DEFAULT_THREAD_MAX_NUMBER

      public static final int DEFAULT_THREAD_MAX_NUMBER
      Default maximum number of threads allowed to run for sending push messages. This constant's value is 20.
      See Also:
    • DEFAULT_CONNECTION_TIMEOUT

      public static final int DEFAULT_CONNECTION_TIMEOUT
      Default timeout (in milliseconds) after which a sending connection should be closed. This constant's value is 20000.
      See Also:
    • DEFAULT_TERMINATE_TIMEOUT

      public static final int DEFAULT_TERMINATE_TIMEOUT
      Default timeout (in milliseconds) when NotificationSDKServer.awaitSendTerminationAndFinish() is called. This constant's value is 60000.
      See Also:
    • DEFAULT_PROXY_TYPE

      public static final NotificationSDKServerProxyTypes DEFAULT_PROXY_TYPE
      Default proxy type
    • DEFAULT_SOCKS_PROXY_PORT

      public static final int DEFAULT_SOCKS_PROXY_PORT
      Default SOCKS proxy port
      See Also:
  • Constructor Details

    • NotificationSDKServerSettings

      public NotificationSDKServerSettings()
      Creates a NotificationSDKServerSettings object. Each specific setting must be set using the dedicated accessor.
  • Method Details

    • getThreadMaxNumber

      public int getThreadMaxNumber()
      Gets the maximum number of threads allowed to run for sending push messages.
      Returns:
      the maximum number of threads allowed to run for sending push messages.
    • setThreadMaxNumber

      public void setThreadMaxNumber(int threadMaxNumber)
      Sets the maximum number of threads allowed to run for sending push messages. Must be greater than 0.
      Parameters:
      threadMaxNumber - maximum number of threads allowed to run for sending push messages
    • getConnectionTimeout

      public int getConnectionTimeout()
      Gets the timeout (in milliseconds) after which a sending connection should be closed.
      Returns:
      the timeout (in milliseconds) after which a sending connection should be closed.
    • setConnectionTimeout

      public void setConnectionTimeout(int connectionTimeout)
      Sets the timeout (in milliseconds) after which a sending connection should be closed. Must be greater than 0.
      Parameters:
      connectionTimeout - timeout (in milliseconds) after which a sending connection should be closed.
    • getTerminateTimeout

      public int getTerminateTimeout()
      Gets the maximum time to wait (in milliseconds) when awaitSendTermination is called.
      Returns:
      the maximum time to wait (in milliseconds) when awaitSendTermination is called
    • setTerminateTimeout

      public void setTerminateTimeout(int terminateTimeout)
      Sets the maximum time to wait (in milliseconds) when awaitSendTermination is called. Must be greater than 0.
      Parameters:
      terminateTimeout - maximum time to wait (in milliseconds) when NotificationSDKServer.awaitSendTerminationAndFinish() is called
    • setProxy

      public void setProxy(NotificationSDKServerProxyTypes proxyType, String hostname, int port, String username, String password)
      Sets the proxy settings if required by your organization.
      Parameters:
      proxyType - Type of proxy used. HTTP and SOCKS proxies are supported.
      hostname - the hostname of the proxy server to which the client should connect.
      port - the port of the proxy server to which the client should connect.
      username - the username used to authenticate to the proxy server, can be null if no authentication is required.
      password - the password used to authenticate to the proxy server, can be null if no authentication is required.
    • getProxyType

      public NotificationSDKServerProxyTypes getProxyType()
      Gets the configured proxy type.
      Returns:
      the proxy type.
    • getProxyHostname

      public String getProxyHostname()
      Gets the configured proxy hostname.
      Returns:
      the proxy hostname.
    • getProxyPort

      public int getProxyPort()
      Gets the configured proxy port.
      Returns:
      the proxy port.
    • getProxyUsername

      public String getProxyUsername()
      Gets the username used to authenticate to the proxy server.
      Returns:
      the username used to authenticate to the proxy server.
    • getProxyPassword

      public String getProxyPassword()
      Gets the password used to authenticate to the proxy server.
      Returns:
      the password used to authenticate to the proxy server.
    • getApnsServerMockConfiguration

      public com.vasco.digipass.sdk.utils.notification.server.mock.ApnsServerMockConfiguration getApnsServerMockConfiguration()
      Gets the APNs server mock configuration.
      Returns:
      the APNs server mock configuration.
    • setApnsServerMockConfiguration

      public void setApnsServerMockConfiguration(com.vasco.digipass.sdk.utils.notification.server.mock.ApnsServerMockConfiguration apnsServerMockConfiguration)
      Sets the APNs server mock configuration.
      Parameters:
      apnsServerMockConfiguration - APNs server mock configuration.