私は、それに設定されたコンテキストを持つSettable Futureオブジェクト "temp"を持っています。また、temp.addListener(new Runnable{...})
メソッドが呼び出され、基本的にリスナーが登録されます。しかし、最終的に例外が発生すると、temp.setException()
が呼び出されます。 setException
が呼び出された場合、リスナーは登録解除されるか、コンテキストがクリアされますか(例外が設定された後は、基本的にSettable Futureオブジェクトが破損しますか?SetTableメソッドが呼び出されると、Settable Futureオブジェクトはどうなりますか?
temp.setContext({temp.set(//some value is set if everything goes right) || temp.setException(//set exception if something comes up)});
temp.addListener(new Runnable{ run(){temp.get()}})