public class AdminIP2LocationSettingsPanel extends VirtualComponentAdapter
This dialog allows administrators to configure the recovery behavior of the IP2Location service, including error thresholds, automatic recovery settings, and notification options. It is opened from the main IP2Location administration panel via the "Settings" button or context menu.
The dialog is organized into four sections:
The panel definition (IP2L_SET) must include controls with these IDs:
| ID | Type | Description |
|---|---|---|
| MNOTIFY | RadioButton | Notify only mode |
| MAUTO | RadioButton | Automatic recovery mode |
| MOFF | RadioButton | Disable service mode |
| MDESC | Label | Mode description text |
| TINIT | TextField | Init failure threshold (1-100) |
| TLOOKUP | TextField | Lookup error threshold (1-1000) |
| MAXATT | TextField | Max auto-recovery attempts (1-10) |
| COOLDOWN | TextField | Cooldown minutes (5-1440) |
| ODLFAIL | CheckBox | Recover on download failure |
| OCORRUPT | CheckBox | Recover on corruption |
| CINIT | Label | Current init failures (read-only) |
| CLOOKUP | Label | Current lookup errors (read-only) |
| CATTEMPT | Label | Current recovery attempts (read-only) |
| OK | Button | Apply and close |
| CANCEL | Button | Close without saving |
// In AdminIP2LocationPanel.doShowSettings():
controller = new AdminIP2LocationSettings(this, page);
Settings are persisted to the server.ini file in the [IP2Location] section. The following keys are used:
recoveryAction - NOTIFY_ONLY, AUTOMATIC, or DISABLE_SERVICEinitFailureThreshold - Integer (default: 2)lookupErrorThreshold - Integer (default: 10)maxAutoRecoveryAttempts - Integer (default: 3)recoveryCooldownMinutes - Integer (default: 60)recoverOnDownloadFailure - Boolean (default: false)recoverOnCorruption - Boolean (default: true)AdminIP2LocationPanel,
RecoveryConfig,
IP2LocationManager.setRecoveryConfig(RecoveryConfig)ICON_CRITICAL, ICON_INFORMATION, ICON_NOICON, ICON_QUERY, ICON_QUESTION, ICON_WARNING, MB_ABORTRETRYIGNORE, MB_CANCEL, MB_ENTER, MB_ENTERCANCEL, MB_OK, MB_OKCANCEL, MB_RETRYCANCEL, MB_YESNO, MB_YESNOCANCEL, MBID_CANCEL, MBID_DEFAULT, MBID_ENTER, MBID_IGNORE, MBID_NO, MBID_OK, MBID_RETRY, MBID_YES| Modifier and Type | Method and Description |
|---|---|
void |
onAction(VirtualPanel vp,
String controlID)
Handles button clicks (OK and Cancel).
|
void |
onCheckedChange(VirtualPanel panel,
VirtualControl control,
String controlID,
int state)
Handles radio button selection changes for the recovery mode.
|
onAction, onAction, onContentChanged, onContentChanged, onControlEvent, onFocusGained, onFocusLost, onMenuAction, onPropertyChange, onSelectionChangedonModalPanelCreate, onModalPanelProcessing, onPageActivated, onPanelClose, onPanelClosing, onPanelCreate, onPanelDestroyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonPageActivated, onPanelClose, onPanelClosing, onPanelCreate, onPanelDestroypublic void onCheckedChange(VirtualPanel panel, VirtualControl control, String controlID, int state)
Updates the mode description text and enables/disables the auto-recovery configuration fields based on the selected mode.
onCheckedChange in interface VirtualComponentListeneronCheckedChange in class VirtualComponentAdapterpanel - The panel (same as this.vp)control - The control that changedcontrolID - The control's ID stringstate - 0=unchecked, 1=checked, 2=indeterminatepublic void onAction(VirtualPanel vp, String controlID)
onAction in class VirtualComponentAdaptervp - The panel (same as this.vp)controlID - The button's ID stringPhantom® and NetPhantom® are registered trademarks of Mindus SARL.
© 2026 Mindus SARL. All rights reserved.