Skip to main content
5-Regular Member
September 29, 2016
Question

Is there a server side event to which we can subscribe

  • September 29, 2016
  • 5 replies
  • 2279 views

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

5 replies

1-Visitor
September 29, 2016

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.

1-Visitor
September 29, 2016

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 .

ahanchat5-Regular MemberAuthor
5-Regular Member
October 3, 2016

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

1-Visitor
October 3, 2016

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.