Interface IAppHistory
IAppSessionGyro
instance.- Author:
- Christopher Mindus
Method Summary
Modifier and TypeMethodDescriptionboolean
clearBackwardEntries
(boolean alsoRemoveCurrent) Clears all backward history entries prior to the current one, with optional removal of the current backward entry.boolean
Clears the index entries from the current location to the end, removing potential forward history actions.Returns the application session gyro.Clears the index entries from the current location to the end, removing potential forward history actions.int
Clears the index entries from the current location to the end, removing potential forward history actions.int
getIndex()
Gets the current history entry index.isBackwardEnabled
(IClientSessionGyro clientGyro) Returns if the backward operation is enabled or not.isForwardEnabled
(IClientSessionGyro clientGyro) Returns if the forward operation is enabled or not.performBackward
(IClientSessionGyro clientGyro, IAppHistoryOperationCompleted completedCallback) Performs the backward operation for the client session in question.performForward
(IClientSessionGyro clientGyro, IAppHistoryOperationCompleted completedCallback) Performs the forward operation for the client session in question.
Method Details
getAppSessionGyro
IAppSessionGyro getAppSessionGyro()Returns the application session gyro.- Returns:
- The application session gyro.
clearBackwardEntries
boolean clearBackwardEntries(boolean alsoRemoveCurrent) Clears all backward history entries prior to the current one, with optional removal of the current backward entry. This does not affect forward entries that may be present.- Parameters:
alsoRemoveCurrent
- Flag to also remove the current backward entry.- Returns:
- true if the operation removed entries, false for no change.
clearForwardEntries
boolean clearForwardEntries()Clears the index entries from the current location to the end, removing potential forward history actions.- Returns:
- true if the operation removed entries, false for no change.
getEntryCount
int getEntryCount()Clears the index entries from the current location to the end, removing potential forward history actions.- Returns:
- true if the operation removed entries, false for no change.
getEntries
IAppHistoryEntry[] getEntries()Clears the index entries from the current location to the end, removing potential forward history actions.- Returns:
- true if the operation removed entries, false for no change.
getIndex
int getIndex()Gets the current history entry index. If the index is equal to the entries array size, there is no forward operations available.- Returns:
- The index value (zero or larger).
isBackwardEnabled
Returns if the backward operation is enabled or not.If a
null String
is returned, the operation is enabled, otherwise the string is the reason why to operation is disabled. This reason is used typically for developers, logging and debugging.- Parameters:
clientGyro
- The client session requesting the backward operation enabled state.- Returns:
- Default
null
meaning enabled, otherwise the reason string for being disabled.
isForwardEnabled
Returns if the forward operation is enabled or not.If a
null String
is returned, the operation is enabled, otherwise the string is the reason why to operation is disabled. This reason is used typically for developers, logging and debugging.- Parameters:
clientGyro
- The client session requesting the forward operation enabled state.- Returns:
- Default
null
meaning enabled, otherwise the reason string for being disabled.
performBackward
String performBackward(IClientSessionGyro clientGyro, IAppHistoryOperationCompleted completedCallback) Performs the backward operation for the client session in question.If a
null String
is returned, the operation is enabled, otherwise the string is the reason why to operation is disabled. This reason is used typically for developers, logging and debugging.Note: this operation may be lengthy and may not complete in the same thread. This means that the
completedCallback
could be called from another thread.- Parameters:
clientGyro
- The client session requesting the backward operation execution.completedCallback
- The callback is called when operation has completed, null for none.- Returns:
- Default
null
meaning enabled and the operation has begun (perhaps not completed yet), otherwise the reason string for being disabled.
performForward
String performForward(IClientSessionGyro clientGyro, IAppHistoryOperationCompleted completedCallback) Performs the forward operation for the client session in question.If a
null String
is returned, the operation is enabled, otherwise the string is the reason why to operation is disabled. This reason is used typically for developers, logging and debugging.Note: this operation may be lengthy and may not complete in the same thread. This means that the
completedCallback
could be called from another thread.- Parameters:
clientGyro
- The client session requesting the forward operation execution.completedCallback
- The callback is called when operation has completed, null for none.- Returns:
- Default
null
meaning enabled and the operation has begun (perhaps not completed yet), otherwise the reason string for being disabled.