-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move gateway calls to OMEROGateway #305
Conversation
Conflicting PR. Removed from build OMERO-insight-push#1147. See the console output for more details.
--conflicts |
That also seems to happen somewhere in the ThumbnailLoader: https://www.openmicroscopy.org/qa2/qa/feedback/31109/ . |
Conflicting PR. Removed from build OMERO-insight-push#1152. See the console output for more details.
--conflicts |
@@ -256,7 +258,7 @@ | |||
* @since OME2.2 | |||
*/ | |||
@SuppressWarnings({"rawtypes", "unchecked"}) | |||
class OMEROGateway | |||
public class OMEROGateway |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a major change.
Methods in the gateway are accessed via the various API/implementation classes
result = f.getHistogram(ctx, img.getDefaultPixels(), | ||
channels, z, t); | ||
} | ||
result = context.getDataService().getOMEROGateway().getHistogram(ctx, img.getDefaultPixels(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should add a method to one of the I/F instead of making the class public
@@ -46,8 +46,7 @@ private BatchCall makeLoadCalls(final SecurityContext ctx, | |||
final long imageID) { | |||
return new BatchCall("Load ROI count from Server") { | |||
public void doCall() throws Exception { | |||
results = context.getGateway().getFacility(ROIFacility.class) | |||
.getROICount(ctx, imageID); | |||
results = context.getDataService().getOMEROGateway().getROICount(ctx, imageID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
Conflicting PR. Removed from build OMERO-insight-push#1153. See the console output for more details.
--conflicts |
Conflicting PR. Removed from build OMERO-insight-push#1161. See the console output for more details.
--conflicts |
Conflicting PR. Removed from build OMERO-insight-push#1201. See the console output for more details.
|
49f413a
to
d5f4d8b
Compare
Is this one good to merge @jburel ? Or shall I exclude it for now? Trying to get my conflicting PRs sorted... |
@dominikl sorry I did not notice the new commits |
Ah yes, sorry, that method is actually not necessary anymore, removed it. |
It would be good to get this in. This would fix a lot of these kinds of crashes on temporary nework loss:
I'll give it another test and put it up for review again... |
Thanks @dominikl |
Should fix most cases which trigger #99 . This PR moves some Java Gateway calls into the OMEROGateway, because there connection issues can be dealt with by trying to reconnect.
Test: Open Insight, login, browse to a dataset with some images, click on one image. Disconnect from the network. Click on another image. Without the PR: Crash with connection exception. With the PR: Reconnection dialog will pop up. Connect to the network again. After a few seconds Insight should have recovered.
Note: I made the OMEROGateway class public for convenience, otherwise I'd have to add another few delegation methods to the OMERODataservice class etc.