I want to find out after discovering a device on the network. How does it affect the thingHandler class ?

Added the openhab2 tag so the right people notice it.

I’m not quite sure what the real question is here, not enough context, but it sounds like this should be asked over at the ESH forums.

Let me explain further

I am following an existing binding which does not have a discovery service. In my case I need the discovery service. So my question is whether discovery service class has a relationship with the handler class that might require me to make more changes in the handler class.

Off the top of my head:

When a Thing is created a ThingHandler class is subsequently created.

In term of discovery service, when you call thingDiscovered(discoveryResult) a few checks happen but if it’s a new thing, the Thing object is created and consequently a new ThingHandler is created.

As far as I’ve experienced there is no direction relationship between them.

If you need a better/more concrete answer you should post here as this is ESH functionality, rather than openHAB.

But it means if the thing was discovered, the handler class will just have to handle sending commands and receiving status.

That’s what the ThingHandler class is for, regardless of whether it was discovered or manually created.

So for example if you are able to use socket connections to discover the devices in the discovery class you don’t need to establish another socket connection in the thinghandler class before sending commands and receiving status.