Announcement Announcement Module
Collapse
No announcement yet.
Cancel / abort / interrupt a spring-android resttemplate request Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cancel / abort / interrupt a spring-android resttemplate request

    I use spring android in a thread dedicated to execute spring android requests.

    I can't achieve to abort a request launched from spring android (a getForObject for instance).

    I tried to :
    • reach the underlying input stream to close but it is completely wrapped in springandroid restemplate and can't be accessed from outside
    • interrupt the thread
    • get the request factory of the rest template and call destroy
    • get the connection manager of the factory and call shutdown
    • change the rest template factory's http client
    • change the rest template factory's request factory
    • but I can't abort a request and send a new one quickly. The first one has to reach its timeout.

    How could I "kill" a spring android request a get a stable rest template to send a new request ?

    Thanks in advance.
Working...
X