I am assuming you are using Box2D for physics simulation.
To implement spring joint effect you need to apply linearimpulse or increase velocity of the duck body at certain time and position..
Certain time and position means first you need to implement contact listener which can identify contacts of other bodies with spring body..
Now once you have contact true for duck body and spring body then check the condition for slide line (may be some variable set to slide line or something else)
If that condition matches you can apply impulse or velocity to certain positive limit..
Also you can have different spring frames so you can apply animation of spring at the time of bounce..So it will look real