Skip to content

Add RemoteLocation interface and abstract class #277

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

Merged
merged 1 commit into from
Jul 13, 2017

Conversation

gab1one
Copy link
Contributor

@gab1one gab1one commented Jul 13, 2017

A RemoteLocation is not located on the current machine. We need the
ability to set a connection timeout for such locations, to prevent them
from halting the whole program.

A RemoteLocation is not located on the current machine. We need the
ability to set a connection timeout for such locations, to prevent them
from halting the whole program.
@ctrueden ctrueden merged commit b431d27 into master Jul 13, 2017
@ctrueden ctrueden deleted the add-remote-location branch July 13, 2017 15:04
@imagejan
Copy link
Member

Instead of the abstract class, could you have defined default implementations directly in the interface? Does that make any difference functionally?

@ctrueden
Copy link
Member

@imagejan At this point I expect you have long known the answer already, but just for those curious: interfaces cannot have fields, so we could not use them to implement the setTimeout method. (For getTimeout(), returning 15000 could have been hardcoded. But it would then need to be overridden in the AbstractRemoteLocation class anyway, so it seems cleaner not to.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants