- 不包含任何邏輯,純粹只是一個空的function,這種function叫做stub function
public void int sum(int a, int b) {
//do not calculate but return a constant number
return 0;
}
- 在分散式系統中,處理的function在remote端,而在local端設計一個function,接收local端的參數,然後再送交remote端處理。
public void int sum(int a, int b) {
//call remote function
mWebRMI.sum(a, b);
}
A stub in distributed computing is a piece of code used for converting parameters passed during a Remote Procedure Call (RPC).
沒有留言:
張貼留言