Streamlined creating RMI objects

This commit is contained in:
nathan 2018-01-27 23:05:09 +01:00
parent 9ec7edba36
commit 205220f8a7

View File

@ -511,12 +511,12 @@ class EndPoint extends Shutdownable {
/**
* Creates a "global" RMI object for use by multiple connections.
*
* @return the ID assigned to this RMI object
*/
public
<T> int createGlobalObject(final T globalObject) {
int globalObjectId = globalRmiBridge.nextObjectId();
globalRmiBridge.register(globalObjectId, globalObject);
int globalObjectId = globalRmiBridge.register(globalObject);
return globalObjectId;
}
}