Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error handling for sync invocations in Java
09-12-2011, 04:25 PM (This post was last modified: 09-12-2011 04:33 PM by simoncn.)
Post: #31
RE: Error handling for sync invocations in Java
(09-12-2011 02:15 PM)simonc Wrote:  Yes. This will indeed be misleading but won't be fatal (as the control point will always be left with a CpDevice it can use).

That's true unless B subsequently goes down for some reason. In that case the sequence would be:

deviceAdded(A)
deviceRemoved(A)
deviceAdded(B)
deviceRemoved(B)

A is still active, but there's no way for the control point to know that.


(09-12-2011 04:25 PM)simoncn Wrote:  That's true unless B subsequently goes down for some reason. In that case the sequence would be:

deviceAdded(A)
deviceRemoved(A)
deviceAdded(B)
deviceRemoved(B)

A is still active, but there's no way for the control point to know that.

How about sending a deviceAdded callback for B without sending a deviceRemoved callback for A? I think this allows all scenarios to work correctly:

1. If A is unplugged and replugged as B, the control point will discover that A isn't working when it next tries to make an invocation on A. At that point it can switch to B and carry on.

2. If A and B are both active simultaneously, the control point is made aware that the same device is available with two addresses and it can take advantage of that to provide redundancy/failover.
Find all posts by this user


Messages In This Thread
RE: Error handling for sync invocations in Java - simoncn - 09-12-2011 04:25 PM

Forum Jump: