Closed sophokles73 closed 10 years ago
Thx Kai,
Maybe, we could do more in this way : an Observation
could have a field resource
typed ResourceSpec
.
What do you think ?
(You could use the "eclipse-code-style.xml" formatter configuration at the root folder of leshan)
I am not sure if I understand correctly, do you mean that the Observation interface should have a method ResourceSpec getResource() instead of method String getResourceRelativePath() and that client code should then invoke String asRelativePath() on the ResourceSpec object itself? I could live with that as well, no problem. I only want to get rid of the duplicated code :-)
that's what I mean :) Replace :
public interface Observation {
Integer getObjectId();
Integer getObjectInstanceId();
Integer getResourceId();
Client getResourceProvider();
ResourceObserver getResourceObserver();
String getResourceRelativePath();
void cancel();
}
By
public interface Observation {
ResourceSpec getResource()
ResourceObserver getResourceObserver();
void cancel();
}
Ok, I will make the changes accordingly.
"Observe" branch is now integrated in master. I will remove the branch before the end of the week.
Thx Kai :)
I am very unsure about the formatting changes. Do we have a set of formatting rules for eclipse that I could use?