Interface IAppHistory
- public interface IAppHistoryThe application history instance, one per application session, common for all client sessions. It is used for backward and optionally forward navigation. The main purpose for this class is to provide information for programmatical use. The information held in this class is fed from the- IAppSessionGyroinstance.- Author:
- Christopher Mindus
 
- Method Summary- All Methods Instance Methods Abstract Methods - Modifier and Type - Method - Description - boolean- clearBackwardEntries(boolean alsoRemoveCurrent)Clears all backward history entries prior to the current one, with optional removal of the current backward entry.- boolean- clearForwardEntries()Clears the index entries from the current location to the end, removing potential forward history actions.- IAppSessionGyro- getAppSessionGyro()Returns the application session gyro.- IAppHistoryEntry[]- getEntries()Clears the index entries from the current location to the end, removing potential forward history actions.- int- getEntryCount()Clears the index entries from the current location to the end, removing potential forward history actions.- int- getIndex()Gets the current history entry index.- java.lang.String- isBackwardEnabled(IClientSessionGyro clientGyro)Returns if the backward operation is enabled or not.- java.lang.String- isForwardEnabled(IClientSessionGyro clientGyro)Returns if the forward operation is enabled or not.- java.lang.String- performBackward(IClientSessionGyro clientGyro, IAppHistoryOperationCompleted completedCallback)Performs the backward operation for the client session in question.- java.lang.String- performForward(IClientSessionGyro clientGyro, IAppHistoryOperationCompleted completedCallback)Performs the forward operation for the client session in question.
 
- Method Detail- 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- java.lang.String isBackwardEnabled(IClientSessionGyro clientGyro) Returns if the backward operation is enabled or not.- If a - null Stringis 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 nullmeaning enabled, otherwise the reason string for being disabled.
 
 - isForwardEnabled- java.lang.String isForwardEnabled(IClientSessionGyro clientGyro) Returns if the forward operation is enabled or not.- If a - null Stringis 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 nullmeaning enabled, otherwise the reason string for being disabled.
 
 - performBackward- java.lang.String performBackward(IClientSessionGyro clientGyro, IAppHistoryOperationCompleted completedCallback) Performs the backward operation for the client session in question.- If a - null Stringis 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 - completedCallbackcould 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 nullmeaning enabled and the operation has begun (perhaps not completed yet), otherwise the reason string for being disabled.
 
 - performForward- java.lang.String performForward(IClientSessionGyro clientGyro, IAppHistoryOperationCompleted completedCallback) Performs the forward operation for the client session in question.- If a - null Stringis 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 - completedCallbackcould 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 nullmeaning enabled and the operation has begun (perhaps not completed yet), otherwise the reason string for being disabled.