Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cf-dev] Nested Resource

Hi,

 

to nest resources you need to add resources to resources.

 

TestResource tw = new TestResource(“test”);

HelloWorldResource hwr = new HelloWorldResource(“helloworld”);

 

tw.add(hwr);

 

server.add(tw);

 

The Javadoc of CoapResource#add(CoapResource) gives also an example.

 

Mit freundlichen Grüßen / Best regards

Dirk Fauth

Automotive Service Solutions, ESI application (AA-AS/EIS2-EU)
Ro
bert Bosch GmbH | Postfach 11 29 | 73201 Plochingen | GERMANY | www.bosch.com
Tel. +49(7153)666-1155 | Dirk.Fauth@xxxxxxxxxxxx


Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000;
Aufsichtsratsvorsitzender: Franz Fehrenbach; Geschäftsführung: Dr. Volkmar Denner,
Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, Dr. Markus Heyn, Dr. Dirk Hoheisel,
Christoph Kübel, Uwe Raschke, Dr. Werner Struth, Peter Tyroller


Von: cf-dev-bounces@xxxxxxxxxxx [mailto:cf-dev-bounces@xxxxxxxxxxx] Im Auftrag von bin ma
Gesendet: Dienstag, 21. März 2017 23:54
An: Californium (Cf) developer discussions <cf-dev@xxxxxxxxxxx>
Betreff: [cf-dev] Nested Resource

 

Hello,

 

I am evaluating Californium and I have some issue with nested resource. For example, I tried to make following resource available:

coap://localhost:5683/test/helloworld

 

I could not figure out a way to make it work. I can do simple URL like coap://localhost:5683/helloworld with no problem but I could not find a way to do nested URL.

 

Can Any one give me a hint?

 

Highly appreciate for any help.

 

Bin

 

 


Back to the top