Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [leshan-dev] use of Leshan API for notifications

Northbound API is currenly only available on master and will probably not be part of the first Leshan release. As you can read many times on this mailing list and on github issues, this feature is really experimental.

The northbound API description is available here : https://github.com/eclipse/leshan/wiki/Cluster#northbound-api


Le 10/01/2017 à 06:36, Ramakrishnan a écrit :
Just to add on to previous question, few questions on message broker which will assist in developing north bound API's.

Does leshan publish  the messages to broker(redi) on change of events?
If so in what version it is available? what will be the list of URL the northbound needs to subscribe to get 
notifications(I assume notifications will be published to  separate url like client_new_ additions, client_update.. etc)

Any pointers on this regard will be helpful in creating the northbound API's

thanks




From: Ramakrishnan <ram_kriz@xxxxxxxxxxx>
To: "leshan-dev@xxxxxxxxxxx" <leshan-dev@xxxxxxxxxxx>
Sent: Tuesday, 10 January 2017 10:43 AM
Subject: use of Leshan API for notifications

Hi All,

I have created a sample listener on Java client side which talks to server side servlets to get the client details and the objects associated with it.

In my setup Eclipse LehanServerDemo is running @10.37.14.XX
My web application(talking to rest server) is running on 10.37.15.XX

In my rest server, I get the clients connected by running the below  code. Now how can my rest server notified when there is any new client connects to the server? or when the client updates the IPSO objects.
I dont want do any polling from the REST server or the application side to get the updates.

How can lesh server notify ?

Code:
           URLConnection conn = url.openConnection();
           conn.setDoOutput(true);
           System.out.println("Connected");
           
                     BufferedReader in = 
               new BufferedReader( new InputStreamReader( conn.getInputStream() ) );
           
           String response;
           while ( (response = in.readLine()) != null ) {
               System.out.println( response );
           }
           in.close();




_______________________________________________
leshan-dev mailing list
leshan-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/leshan-dev


Back to the top