Search in sources :

Example 1 with TerminateSessionParameters

use of org.ovirt.engine.core.common.action.TerminateSessionParameters in project ovirt-engine by oVirt.

the class TerminateSessionsModel method onTerminate.

private void onTerminate() {
    final List<ActionParametersBase> parameterList = new ArrayList<>(sessions.size());
    for (UserSession session : sessions) {
        final long sessionId = session.getId();
        final TerminateSessionParameters terminateSessionParameters = new TerminateSessionParameters(sessionId);
        parameterList.add(terminateSessionParameters);
    }
    Frontend.getInstance().runMultipleActions(ActionType.TerminateSession, parameterList, result -> sourceListModel.getSearchCommand().execute());
    cancel();
}
Also used : TerminateSessionParameters(org.ovirt.engine.core.common.action.TerminateSessionParameters) UserSession(org.ovirt.engine.core.common.businessentities.UserSession) ArrayList(java.util.ArrayList) ActionParametersBase(org.ovirt.engine.core.common.action.ActionParametersBase)

Aggregations

ArrayList (java.util.ArrayList)1 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)1 TerminateSessionParameters (org.ovirt.engine.core.common.action.TerminateSessionParameters)1 UserSession (org.ovirt.engine.core.common.businessentities.UserSession)1