public class Handler extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Handler.ErrorArgs
Error event arguments.
|
static interface |
Handler.ErrorListener
Handler error listener interface.
|
static class |
Handler.ErrorReason
Handler error reason.
|
static class |
Handler.State
Handler state.
|
static class |
Handler.StateChangedArgs
State changed event arguments.
|
static interface |
Handler.StateChangedListener
Handler state changed listener interface.
|
static class |
Handler.WarningArgs
Warning event arguments.
|
static interface |
Handler.WarningListener
Handler warning listener interface.
|
static class |
Handler.WarningReason
Handler warning reason.
|
Modifier and Type | Field and Description |
---|---|
static Handler.ErrorListener |
NULL_ERROR_LISTENER |
static Handler.StateChangedListener |
NULL_STATE_CHANGED_LISTENER |
static Handler.WarningListener |
NULL_WARNING_LISTENER |
Modifier and Type | Method and Description |
---|---|
void |
addThreadStartedListener(ThreadStartedListener listener)
Adds thread started listener.
|
static Handler.ErrorListener |
getErrorListener()
Returns error listener.
|
static Handler |
getInstance()
The instance of the handler.
|
License |
getLicense() |
String |
getProductName()
Returns product name
|
String |
getProductNameAndVersion()
Returns product name and version
|
String |
getProductVersion()
Returns handler version
|
HandlerSettings |
getSettings()
Returns handler settings.
|
static Handler.StateChangedListener |
getStateChangedListener()
Returns state changed listener.
|
StorageRepositoryManager |
getStorageRepositoryManager() |
static Handler.WarningListener |
getWarningListener()
Returns warning listener.
|
static Handler |
init()
Initializes the handler by default values.
|
static Handler |
init(HandlerSettings settings)
Initializes the handler by
HandlerSettings . |
static Handler |
init(Properties settings)
Initializes the handler by
Properties . |
static Handler |
init(Settings settings)
Initializes the handler by
Settings . |
static boolean |
isInited()
Verify whether handler is inited.
|
static boolean |
isNotInited()
Verify whether handler is inited.
|
void |
removeThreadStartedListener(ThreadStartedListener listener)
Removes thread started listener.
|
static void |
setErrorListener(Handler.ErrorListener listener)
Sets error listener.
|
static void |
setStateChangedListener(Handler.StateChangedListener listener)
Sets state changed listener.
|
static void |
setWarningListener(Handler.WarningListener listener)
Sets warning listener.
|
void |
shutdown()
Shut downs the handler.
|
String |
toString() |
static void |
verifyHandlerInited()
Verifies that handler inited
|
static void |
verifyHandlerNotInited()
Verifies that handler is not inited
|
public static final Handler.StateChangedListener NULL_STATE_CHANGED_LISTENER
public static final Handler.WarningListener NULL_WARNING_LISTENER
public static final Handler.ErrorListener NULL_ERROR_LISTENER
public static Handler init()
public static Handler init(Properties settings)
Properties
.
settings
- Configuration settings.public static Handler init(Settings settings)
Settings
.
settings
- Configuration settings.public static Handler init(HandlerSettings settings)
HandlerSettings
.
settings
- Handler configuration settingspublic void shutdown()
public static Handler getInstance()
public static boolean isInited()
public static boolean isNotInited()
public static void verifyHandlerInited()
HandlerException
- if handler is not initedpublic static void verifyHandlerNotInited()
HandlerException
- if handler is initedpublic static Handler.StateChangedListener getStateChangedListener()
public static void setStateChangedListener(Handler.StateChangedListener listener)
listener
- state change listener or NULL_STATE_CHANGED_LISTENER
value to reset listener to defaultpublic static Handler.WarningListener getWarningListener()
public static void setWarningListener(Handler.WarningListener listener)
listener
- warning listener or NULL_WARNING_LISTENER
value to reset listener to defaultpublic static Handler.ErrorListener getErrorListener()
public static void setErrorListener(Handler.ErrorListener listener)
listener
- error listener or NULL_ERROR_LISTENER
value to reset listener to defaultpublic void addThreadStartedListener(ThreadStartedListener listener)
listener
- thread started listenerpublic void removeThreadStartedListener(ThreadStartedListener listener)
listener
- thread started listenerpublic HandlerSettings getSettings()
public StorageRepositoryManager getStorageRepositoryManager()
public License getLicense()
public String getProductVersion()
public String getProductName()
public String getProductNameAndVersion()
Copyright © 2005–2024 Onix Solutions. All rights reserved.