Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cf-dev] ServerMessageDeliverer Issue #318

I would like to make a case to reopen issue #318 because I think we need to remove the final keyword on ServerMessageDeliverer.findResource()

This is the best place to implement wild cards in URI searches like the javadoc suggests:
	 * Searches in the resource tree for the specified path. A parent resource
	 * may accept requests to subresources, e.g., to allow addresses with
	 * wildcards like <code>coap://example.com:5683/devices/*</code>

Unfortunately, the final keyword on findResource() makes this impossible without reimplementing all of deliverRequest(). I don't see how the new preDeliverRequest() helps since we still have to reimplement all of deliverRequest(), so might as well reimplement deliverRequest() directly.

I would argue it is more dangerous to force people to reimplement deliverRequest() and hide any future changes you might make, compared to allowing findResource() overrides. By trying to hide the internals of ServerMessageDeliverer, you are exposing them a lot more.

The only thing missing after removing the final keywords is to add a getRoot() accessor because it is needed to implement our own findResource().

I'm asking for findResource(), but I would prefer if none of the ServerMessageDeliverer methods were final.


Back to the top