public class TerminateSessions
extends com.google.gwt.user.client.ui.Composite
Modifier and Type | Class and Description |
---|---|
(package private) static interface |
TerminateSessions.Binder
GWT binder.
|
static class |
TerminateSessions.JarActionType
Action type enum.
|
Modifier and Type | Field and Description |
---|---|
private TerminateSessions.JarActionType |
actionType
jar action type
|
private AdminServiceAsync |
adm
Admin service reference
|
private java.lang.String |
apiInterfaceClass
api interface class
|
private java.util.function.Consumer<java.lang.Boolean> |
closeHandler
close handler
|
private ModalDialogs |
dialogs
Modal dialogs
|
(package private) org.gwtbootstrap3.client.ui.gwt.DataGrid |
grid
sessions grid
|
private GridHandle<SessionInfo> |
gridHandle
sessions grid handle
|
(package private) org.gwtbootstrap3.client.ui.Heading |
gridTitle
sessions grid title
|
(package private) org.gwtbootstrap3.client.ui.html.Text |
helpText
widget
|
(package private) org.gwtbootstrap3.client.ui.Modal |
modal
widget
|
private java.lang.String |
targetJar
target jar
|
Constructor and Description |
---|
TerminateSessions(AdminServiceAsync adm,
ModalDialogs dialogs)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
bCancelClick(com.google.gwt.event.dom.client.ClickEvent event)
Click handler.
|
void |
bRefreshClick(com.google.gwt.event.dom.client.ClickEvent event)
Click handler.
|
void |
bTerminateClick(com.google.gwt.event.dom.client.ClickEvent event)
Click handler.
|
private void |
close(java.lang.Boolean code)
Calls the close handler and closes the dialog.
|
private java.lang.String |
formatLogonTime(SessionInfo sessionInfo)
Time format helper.
|
private void |
handleDeregisterResult(boolean force,
JarOpErrorCode result)
Last phase of library deregister.
|
private void |
handleTerminateSessions()
Perform the desired action, optionally, forcibly terminating sessions.
|
private void |
refreshSessions(java.lang.Runnable onSuccess)
Refresh the list of active sessions.
|
void |
show(com.google.gwt.user.client.ui.HasWidgets parent,
TerminateSessions.JarActionType actionType,
java.lang.String targetJar,
java.lang.String apiInterfaceClass,
java.util.function.Consumer<java.lang.Boolean> closeHandler)
Displays this widget.
|
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
@UiField org.gwtbootstrap3.client.ui.gwt.DataGrid grid
@UiField org.gwtbootstrap3.client.ui.Heading gridTitle
@UiField org.gwtbootstrap3.client.ui.html.Text helpText
@UiField org.gwtbootstrap3.client.ui.Modal modal
private TerminateSessions.JarActionType actionType
private java.lang.String targetJar
private java.lang.String apiInterfaceClass
private java.util.function.Consumer<java.lang.Boolean> closeHandler
private GridHandle<SessionInfo> gridHandle
private final AdminServiceAsync adm
private final ModalDialogs dialogs
@Inject public TerminateSessions(AdminServiceAsync adm, ModalDialogs dialogs)
adm
- Admin service reference.dialogs
- Modal dialogs.public void show(com.google.gwt.user.client.ui.HasWidgets parent, TerminateSessions.JarActionType actionType, java.lang.String targetJar, java.lang.String apiInterfaceClass, java.util.function.Consumer<java.lang.Boolean> closeHandler)
parent
- Parent where this widget is attached.actionType
- Action type.targetJar
- Target jar.apiInterfaceClass
- API interface class.closeHandler
- Close handler.@UiHandler(value="bCancel") public void bCancelClick(com.google.gwt.event.dom.client.ClickEvent event)
event
- Click event.@UiHandler(value="bRefresh") public void bRefreshClick(com.google.gwt.event.dom.client.ClickEvent event)
event
- Click event.@UiHandler(value="bTerminate") public void bTerminateClick(com.google.gwt.event.dom.client.ClickEvent event)
event
- Click event.private void refreshSessions(java.lang.Runnable onSuccess)
onSuccess
- Success callback.private void handleTerminateSessions()
private void handleDeregisterResult(boolean force, JarOpErrorCode result)
force
- Force flag from the previous phase.result
- Result from the previous phase.private java.lang.String formatLogonTime(SessionInfo sessionInfo)
sessionInfo
- Session info.private void close(java.lang.Boolean code)
code
- The result code that will be passed to the close handler.