Class NotificationSDKServerSettings
java.lang.Object
com.vasco.digipass.sdk.utils.notification.server.NotificationSDKServerSettings
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Default timeout (in milliseconds) after which a sending connection should be closed.static final NotificationSDKServerProxyTypes
Default proxy typestatic final int
Default SOCKS proxy portstatic final int
Default timeout (in milliseconds) whenNotificationSDKServer.awaitSendTerminationAndFinish()
is called.static final int
Default maximum number of threads allowed to run for sending push messages. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.vasco.digipass.sdk.utils.notification.server.mock.ApnsServerMockConfiguration
Gets the APNs server mock configuration.int
Gets the timeout (in milliseconds) after which a sending connection should be closed.Gets the configured proxy hostname.Gets the password used to authenticate to the proxy server.int
Gets the configured proxy port.Gets the configured proxy type.Gets the username used to authenticate to the proxy server.int
Gets the maximum time to wait (in milliseconds) when awaitSendTermination is called.int
Gets the maximum number of threads allowed to run for sending push messages.void
setApnsServerMockConfiguration
(com.vasco.digipass.sdk.utils.notification.server.mock.ApnsServerMockConfiguration apnsServerMockConfiguration) Sets the APNs server mock configuration.void
setConnectionTimeout
(int connectionTimeout) Sets the timeout (in milliseconds) after which a sending connection should be closed.void
setProxy
(NotificationSDKServerProxyTypes proxyType, String hostname, int port, String username, String password) Sets the proxy settings if required by your organization.void
setTerminateTimeout
(int terminateTimeout) Sets the maximum time to wait (in milliseconds) when awaitSendTermination is called.void
setThreadMaxNumber
(int threadMaxNumber) Sets the maximum number of threads allowed to run for sending push messages.
-
Field Details
-
DEFAULT_THREAD_MAX_NUMBER
public static final int DEFAULT_THREAD_MAX_NUMBERDefault 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_TIMEOUTDefault 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_TIMEOUTDefault timeout (in milliseconds) whenNotificationSDKServer.awaitSendTerminationAndFinish()
is called. This constant's value is 60000.- See Also:
-
DEFAULT_PROXY_TYPE
Default proxy type -
DEFAULT_SOCKS_PROXY_PORT
public static final int DEFAULT_SOCKS_PROXY_PORTDefault SOCKS proxy port- See Also:
-
-
Constructor Details
-
NotificationSDKServerSettings
public NotificationSDKServerSettings()Creates aNotificationSDKServerSettings
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) whenNotificationSDKServer.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
Gets the configured proxy type.- Returns:
- the proxy type.
-
getProxyHostname
Gets the configured proxy hostname.- Returns:
- the proxy hostname.
-
getProxyPort
public int getProxyPort()Gets the configured proxy port.- Returns:
- the proxy port.
-
getProxyUsername
Gets the username used to authenticate to the proxy server.- Returns:
- the username used to authenticate to the proxy server.
-
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.
-