Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

how to add a timeout to a STAF request

LinFu
2011-11-23
2013-06-12
  • LinFu
    LinFu
    2011-11-23

    we implemented several staf-base java services, each service supports a lot of APIs. Generally speaking, most of those APIs are not support timeout, however, now i want to call some APIs with a timeout argument. Is that possible to call with a timeout and without changing the existing services' interface.

    It is indeed possible to call those APIs using STAF PROCESS START COMMAND <another STAF REQUEST> [WAIT [<Number>]. But it is very strange to embed one STAF-request into another one.

    so my question is: is there another way to make a call with a timeout.

     
  • Sharon Lucas
    Sharon Lucas
    2011-11-26

    In your Java code that submits your custom STAF Java service requests, I suppose you could implement a timer that checks if a specified time duration has elapsed and if so then do something.

     
  • LinFu
    LinFu
    2011-11-28

    thank for your feedback.