Hi,
I'm devolping an application that pretends to monitoring the network and pull some data from all devices, with a constant frequency.
Due to do that I'm trying to create a "pulling client" that extends Thread class, and in the run method I'm iterating a list with all devices. This list is stored in a DefaultClient.
I can get to the devices and the operations. I'm using the invoke method to call the operation and it works.
This invoke method is bloking, and I need to configure a timeout to skip the non responding devices.
Can anyone help me to understand which is the best way to do that?
Maybe using the clienttimeout?
BR,
Pedro
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Pedro,
a better way to monitor the network is by listening for hello and BYE messages. Also, you should use eventing to get the information from the devices.
Regards,
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I need to implement a network monitoring entity with several different behaviors.
I'm already using the messages of hello and bye to update the list. In fact I already use the events to monitor the network, and wich devices are working or not.
But I need to implement an interaction of request-reply with the devices. I can make the connection and if they are active and responsive the interaction works well, otherwise the method of invoke, blocks the entire process.
I thought about using the java Executer or the ThreadPoolExecuter classes to perform this interaction.
I just want to see if there is any easier or direct way to do so. For example, by using a timeout of the client or something like that.
BR,
Pedro
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Pedro,
at the moment, we do not provide an easier way to set a timeout to an invoke operation. But we will consider adding one in the future. Thanks a lot for this suggestion!
BR,
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm devolping an application that pretends to monitoring the network and pull some data from all devices, with a constant frequency.
Due to do that I'm trying to create a "pulling client" that extends Thread class, and in the run method I'm iterating a list with all devices. This list is stored in a DefaultClient.
I can get to the devices and the operations. I'm using the invoke method to call the operation and it works.
This invoke method is bloking, and I need to configure a timeout to skip the non responding devices.
Can anyone help me to understand which is the best way to do that?
Maybe using the clienttimeout?
BR,
Pedro
Hi Pedro,
a better way to monitor the network is by listening for
hello
andBYE
messages. Also, you should useeventing
to get the information from the devices.Regards,
Chris
Hi Chris,
Thanks for your help.
I need to implement a network monitoring entity with several different behaviors.
I'm already using the messages of hello and bye to update the list. In fact I already use the events to monitor the network, and wich devices are working or not.
But I need to implement an interaction of request-reply with the devices. I can make the connection and if they are active and responsive the interaction works well, otherwise the method of invoke, blocks the entire process.
I thought about using the java Executer or the ThreadPoolExecuter classes to perform this interaction.
I just want to see if there is any easier or direct way to do so. For example, by using a timeout of the client or something like that.
BR,
Pedro
Hi Pedro,
at the moment, we do not provide an easier way to set a timeout to an invoke operation. But we will consider adding one in the future. Thanks a lot for this suggestion!
BR,
Chris
Hi Cris,
I came with a solution some time ago, and I'll let it here to anyone who want it.
I'm using the Executers and Timer classes to manage the solution.
Best Regards
Pedro