cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a server side event to which we can subscribe

Highlighted
Regular Member

Is there a server side event to which we can subscribe

Dear All,

I want to listen to an server side event and get the host name of the server.

Could you please help me provide the solution.

Appreciate your help.

Thanks

Anirudha

Tags (1)
5 REPLIES 5

Re: Is there a server side event to which we can subscribe

Hi,

Server host name it's not a thing that changes, you mean to subscribe to this kind of changes?

By the way, there's no currently way to recover current hostname from within TW.

Best Regards,

Carles.

Re: Is there a server side event to which we can subscribe

Hi Anirudha Hanchate​ What are you trying to achieve , Server side event? what is your server ?

Are you trying to do it from Thingworx ?

Or you are trying to achieve this from some SDK like Java SDK .

Here in Thingworx , we consider the machine where thingsworx is deployed as Server and all the devices which are connected to Thingworx through different SDK as Things (represented as Virtual thing in SDK ).

Please explain in detail what are you trying to do .

Re: Is there a server side event to which we can subscribe

Hi Ravi,

I have Thingworx server, wherein I have few Things written in javascript.

When I start the Thingworx server, I want to execute a service of Thing. At the same time, I want the Thingworx Server's host name.

Thanks for your time.

Regards

Anirudha

Re: Is there a server side event to which we can subscribe

There's no ThingWorx Server start event, but you have a ThingStart event which can be more meaningful, each thing can subscribe to their own ThingStart event, or you can have a "root thing" and other things subscribe to "root thing" ThingStart event --> Kind of Thingworx server restart.

About having hostname for ThingWorx server, here you are out of luck, there isn't this info out-of-the-box, but you may do it with a custom server side extension, or event calling a remote service like whatismyip.com and then do a reserve lookup with it.

Re: Is there a server side event to which we can subscribe

Thank you Carles,

I am working on the lines mentioned by you.

I will keep you posted.

Many Thanks

Anirudha