public class HandlerSettings extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ASYNC_FILE_STORAGE_QUEUE_SIZE_DEFAULT |
static String |
ASYNC_FILE_STORAGE_QUEUE_SIZE_PROP |
static int |
ASYNC_FILE_STORAGE_WRITE_ERROR_RETRIES_NUMBER_DEFAULT |
static String |
ASYNC_FILE_STORAGE_WRITE_ERROR_RETRIES_NUMBER_PROP |
static boolean |
EVENT_ARG_REUSE_DEFAULT |
static String |
EVENT_ARG_REUSE_PROP |
static boolean |
IGNORE_FILE_BASED_STORAGE_INTEGRITY_ERRORS_DEFAULT |
static String |
IGNORE_FILE_BASED_STORAGE_INTEGRITY_ERRORS_PROP |
static String |
LICENSE_FILE_DEFAULT |
static String |
LICENSE_FILE_PROP |
static int |
LISTENER_DELAY_WARNING_THRESHOLD_DEFAULT |
static String |
LISTENER_DELAY_WARNING_THRESHOLD_PROP |
static int |
RESENDING_QUEUE_SIZE_DEFAULT |
static String |
RESENDING_QUEUE_SIZE_PROP |
static boolean |
SHUTDOWN_HOOK_DEFAULT |
static String |
SHUTDOWN_HOOK_PROP |
static String |
STORAGE_FOLDER_DEFAULT |
static String |
STORAGE_FOLDER_PROP |
Constructor and Description |
---|
HandlerSettings()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getAsyncFileStorageQueueSize()
Returns async file session storage queue size.
|
int |
getAsyncFileStorageWriteErrorRetriesNumber()
Returns async file session storage write error retries number.
|
String |
getFullStorageFolder()
Returns full storage folder path.
|
String |
getLicense()
Returns the content of the license file if it is set explicitly using
setLicense(String) . |
String |
getLicenseFile()
Returns the name of the license file resource.
|
int |
getListenerDelayWarningThreshold()
Returns the limit of time to spend in the session listener code.
|
int |
getResendingQueueSize()
Returns the number of sent messages that are available for resending on counterparty's Resend Request(2) message.
|
String |
getStorageFolder()
Returns file-based session storage folder.
|
void |
init(Settings settings)
Initializes the settings.
|
boolean |
isEventArgReuse()
Returns whether to re-use session event argument objects in each session.
|
boolean |
isIgnoreFileBasedStorageIntegrityErrors()
Returns whether to ignore file based storage integrity errors.
|
boolean |
isShutdownHook()
Returns whether to shutdown handler automatically on JVM shutdown.
|
void |
setAsyncFileStorageQueueSize(int asyncFileStorageQueueSize)
Sets async file session storage queue size.
|
void |
setAsyncFileStorageWriteErrorRetriesNumber(int asyncFileStorageWriteErrorRetriesNumber)
Sets async file session storage write error retries number.
|
void |
setEventArgReuse(boolean eventArgReuse)
Sets whether to re-use session event argument objects in each session.
|
void |
setIgnoreFileBasedStorageIntegrityErrors(boolean ignoreFileBasedStorageIntegrityErrors)
Sets whether to ignore file based storage integrity errors.
|
void |
setLicense(String license)
Sets the content of the license file.
|
void |
setLicenseFile(String licenseFile)
Sets the name of the license file resource.
|
void |
setListenerDelayWarningThreshold(int listenerDelayWarningThreshold)
Sets the limit of time to spend in the session listener code.
|
void |
setResendingQueueSize(int resendingQueueSize)
Sets the number of sent messages that are available for resending on counterparty's Resend Request(2) message.
|
void |
setShutdownHook(boolean shutdownHook)
Sets to shutdown handler automatically on JVM shutdown.
|
void |
setStorageFolder(String storageFolder)
Sets file-based session storage folder.
|
String |
toString() |
public static final String LICENSE_FILE_PROP
public static final String LICENSE_FILE_DEFAULT
public static final String EVENT_ARG_REUSE_PROP
public static final boolean EVENT_ARG_REUSE_DEFAULT
public static final String LISTENER_DELAY_WARNING_THRESHOLD_PROP
public static final int LISTENER_DELAY_WARNING_THRESHOLD_DEFAULT
public static final String STORAGE_FOLDER_PROP
public static final String STORAGE_FOLDER_DEFAULT
public static final String RESENDING_QUEUE_SIZE_PROP
public static final int RESENDING_QUEUE_SIZE_DEFAULT
public static final String IGNORE_FILE_BASED_STORAGE_INTEGRITY_ERRORS_PROP
public static final boolean IGNORE_FILE_BASED_STORAGE_INTEGRITY_ERRORS_DEFAULT
public static final String ASYNC_FILE_STORAGE_QUEUE_SIZE_PROP
public static final int ASYNC_FILE_STORAGE_QUEUE_SIZE_DEFAULT
public static final String ASYNC_FILE_STORAGE_WRITE_ERROR_RETRIES_NUMBER_PROP
public static final int ASYNC_FILE_STORAGE_WRITE_ERROR_RETRIES_NUMBER_DEFAULT
public static final String SHUTDOWN_HOOK_PROP
public static final boolean SHUTDOWN_HOOK_DEFAULT
public void init(Settings settings)
settings
- settings to initialize withNullPointerException
- if (settings == null)
IllegalArgumentException
- if settings has incorrect valuepublic String getLicenseFile()
LICENSE_FILE_DEFAULT
.
LICENSE_FILE_PROP
.public void setLicenseFile(String licenseFile)
LICENSE_FILE_DEFAULT
.
LICENSE_FILE_PROP
.licenseFile
- license file resourceNullPointerException
- if (licenseFile == null)
public void setLicense(String license)
license
- license file content, null
to reset the valueNullPointerException
- if (license == null)
public String getLicense()
setLicense(String)
.null
if it is not set explicitlypublic boolean isEventArgReuse()
EVENT_ARG_REUSE_DEFAULT
.
EVENT_ARG_REUSE_PROP
.public void setEventArgReuse(boolean eventArgReuse)
EVENT_ARG_REUSE_DEFAULT
.
EVENT_ARG_REUSE_PROP
.eventArgReuse
- whether to re-use session event argument objectspublic int getListenerDelayWarningThreshold()
public void setListenerDelayWarningThreshold(int listenerDelayWarningThreshold)
listenerDelayWarningThreshold
- delay in millisecondsIllegalArgumentException
- if (sessionListenerDelayWarningThreshold < 1)
public String getStorageFolder()
STORAGE_FOLDER_DEFAULT
.
STORAGE_FOLDER_PROP
.public void setStorageFolder(String storageFolder)
STORAGE_FOLDER_DEFAULT
.
STORAGE_FOLDER_PROP
.storageFolder
- file-based session storage folderNullPointerException
- if (storageFolder == null)
.public String getFullStorageFolder()
public int getResendingQueueSize()
RESENDING_QUEUE_SIZE_DEFAULT
.
RESENDING_QUEUE_SIZE_PROP
.public void setResendingQueueSize(int resendingQueueSize)
RESENDING_QUEUE_SIZE_DEFAULT
.
RESENDING_QUEUE_SIZE_PROP
.resendingQueueSize
- resending queue size in messagesIllegalArgumentException
- if (resendingQueueSize < 0)
public boolean isIgnoreFileBasedStorageIntegrityErrors()
IGNORE_FILE_BASED_STORAGE_INTEGRITY_ERRORS_DEFAULT
.
IGNORE_FILE_BASED_STORAGE_INTEGRITY_ERRORS_PROP
.public void setIgnoreFileBasedStorageIntegrityErrors(boolean ignoreFileBasedStorageIntegrityErrors)
IGNORE_FILE_BASED_STORAGE_INTEGRITY_ERRORS_DEFAULT
.
IGNORE_FILE_BASED_STORAGE_INTEGRITY_ERRORS_PROP
.ignoreFileBasedStorageIntegrityErrors
- whether to ignore file based storage integrity errors.public int getAsyncFileStorageQueueSize()
ASYNC_FILE_STORAGE_QUEUE_SIZE_DEFAULT
.
ASYNC_FILE_STORAGE_QUEUE_SIZE_PROP
.public void setAsyncFileStorageQueueSize(int asyncFileStorageQueueSize)
ASYNC_FILE_STORAGE_QUEUE_SIZE_DEFAULT
.
ASYNC_FILE_STORAGE_QUEUE_SIZE_PROP
.asyncFileStorageQueueSize
- async file session storage queue sizeIllegalArgumentException
- if (asyncFileStorageQueueSize < 1)
public int getAsyncFileStorageWriteErrorRetriesNumber()
ASYNC_FILE_STORAGE_WRITE_ERROR_RETRIES_NUMBER_DEFAULT
.
ASYNC_FILE_STORAGE_WRITE_ERROR_RETRIES_NUMBER_PROP
.public void setAsyncFileStorageWriteErrorRetriesNumber(int asyncFileStorageWriteErrorRetriesNumber)
ASYNC_FILE_STORAGE_WRITE_ERROR_RETRIES_NUMBER_DEFAULT
.
ASYNC_FILE_STORAGE_WRITE_ERROR_RETRIES_NUMBER_PROP
.asyncFileStorageWriteErrorRetriesNumber
- async file session storage write error retries numberIllegalArgumentException
- if (asyncFileStorageWriteErrorRetriesNumber < 0)
public boolean isShutdownHook()
SHUTDOWN_HOOK_DEFAULT
.
SHUTDOWN_HOOK_PROP
.public void setShutdownHook(boolean shutdownHook)
SHUTDOWN_HOOK_DEFAULT
.
SHUTDOWN_HOOK_PROP
.shutdownHook
- whether to shutdown handler automatically on JVM shutdownCopyright © 2005–2024 Onix Solutions. All rights reserved.