eclipse - Californium CoAP path parameters -


i'm working on coap application using eclipse californium , need pass parameters using url in restful web services. possible in californium coap implementation, , if please let me know how it. ex:

coap://localhost:5683/foo/{fooid} 

the short answer yes can it.

as stated in javadocs

  • when request arrives @ server, {@link servermessagedeliverer} searches in resource tree destination resource. travels down resource tree looking 1 element of destination uri after , calling method {@link #getchild(string)} on each element. allowed override method , return arbitrary resource. allows instance serve uris wildcards or delegate requests sub-uri same resource.

so have override deliverrequest , maybe findresource methods in org.eclipse.californium.core.server.servermessagedeliverer in order return appropriate resource handle request. required analyse exchange request uripath part of resource handleget/put/post/etc fetch path variable (this can done using coapexchange.advanced().getrequest().getoptions().geturipath())

based on source code of californium should pretty easy override default behaviour of request deliverer.

good luck that!


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -