Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PushRegistry Question

 
Girish Nagaraj
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q)What will happen when a stream connection received by the AMS via Push Registry mechanism times out for an application that is not currently running?

Choices:

a) An InterruptedIOException will be thrown to the application upon connection transfer from the AMS to the application.

b) The behaviour is not defined by the specification.

Which is correct choice?
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is actually an optional implementation that the implementers need to thrown InterruptedIOException when a time out occurs.

Since it is defined in the Spec, the choice a would be the most suitable one to select. But we can't be sure that "an InterruptedIOException will be thrown to the application upon connection transfer from the AMS to the application.". It depends on the implementer's choice.

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic