Last modified 8 years ago
Last modified on 02/02/05 12:43:03
The KaRMI Call Protocol
Currently, the KaRMI call protocol for a remote method invocation looks approximately like the following:
Client side
ClientConnection c = Technology.getContext(...) c.openSendCall() // marshal arguments c.closeSendCall() normalReturn = c.openReceiveResult() if (normalReturn) { // unmarshal result } else { // unmarshal exeption ex } c.closeReceiveResult() if (normalReturn) { return result; } else { throw ex; }
Server side
// The connection c belongs one-to-one to the serving // thread. ServerConnection c; c.openReceiveCall() // unmarshal arguments c.closeReceiveCall() try { try { // application code } catch (Exception ex) { c.openSendResult(false) // marshal ex throw ex } c.openSendResult(true) // marshal result } catch (Exception ex) {} c.closeSendResult()
