Change in ovirt-engine[master]: webadmin: introduce NullableFrontendActionAsyncCallback

tjelinek at redhat.com tjelinek at redhat.com
Wed Feb 6 10:18:08 UTC 2013


Tomas Jelinek has submitted this change and it was merged.

Change subject: webadmin: introduce NullableFrontendActionAsyncCallback
......................................................................


webadmin: introduce NullableFrontendActionAsyncCallback

The methods Frontend#RunAction expect to receive an instance of
IFrontendActionAsyncCallback. but there are multiple places where the
result of the action isn't interesting. in those cases an instance of
empty IFrontendActionAsyncCallback is created and passed to those
methods.

This patch introduce Frontend#NULLABLE_ASYNC_CALLBACK which is an
instance of Frontend#NullableFrontendActionAsyncCallback that we can
passe to Frontend#RunAction methods instead.

Using NULLABLE_ASYNC_CALLBACK instead of creating new empty
implementation each time is better because:
1. the code is more readable as each creation of empty implementation of
the callback interface is composed on several lines in the code
2. the code is more efficient as we create less objects

Change-Id: Ic0cf37a9f4ffb973a3791323596af6d97c7365cb
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterGuideModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageListModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/VmItemBehavior.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java
6 files changed, 41 insertions(+), 92 deletions(-)

Approvals:
  Tomas Jelinek: Verified; Looks good to me, approved


--
To view, visit http://gerrit.ovirt.org/11734
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0cf37a9f4ffb973a3791323596af6d97c7365cb
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Kanagaraj M <kmayilsa at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs at redhat.com>



More information about the Engine-commits mailing list