import IE.Iona.Orbix2.CORBA.Any; import IE.Iona.Orbix2.CORBA.SystemException; public class ServerImpl implements _ServerOperations { private float balance; public ServerImpl() { balance = 101.42f; } public _FutureRef getBalance() throws SystemException { // wait for 10 seconds, just to prove that the call actually is non-blocking try { Thread.sleep(10000); } catch (InterruptedException e) { } // create an EAny object to store the result in EAnyImpl result = new EAnyImpl(); // insert the result into the EAny object result.insertFloat(balance); // return a tie to the EAny object. // An EAny tie is created, however it is cast to a FutureRef to match return types. // This also allows the return value to be cast back to an _EAnyRef in the intermediate. return (_FutureRef) new _tie_EAny(result); } }