Global Positioning System Reference
In-Depth Information
by the ROServer against a rule set. Vice versa, if a RealObject claims to
be real and live, any real-world server should be satisfied with its behavior.
TODO: Server strategy to publish SOs without URLs. For a quick realiza-
tion of the game, the method LondonChase.enter creates and publishes the
RemotePlayerInfo :
...
RemotePlayerInfo playerInfo = player.getRemotePlayerInfo();
playerURL = settings.getServerName()
+ "/Player" + player.getIdentity();
if ( RMI.registerRemoteObject( playerURL, playerInfo ))
{
// player.setRegisteredURL( playerURL ); //other concept ...
playerInfoAddresses.add( playerURL );
}
...
This implementation is sucient for clients to look up the players on the
server's registry:
private void lookupRemotePlayers() {
...
String[] playerURLs = roApp.getPlayerURLs();
...
The developer should understand that after looking up the player info, the
client has a direct reference to the remote server player. This reference
is not disconnected, if the server decides to unbind the object from the
registry! Also, the server can pass a reference without publishing an URL.
Another aspect to be aware of is the fact that a RealObject does not
necessarily know its own URL. Therefore, the server can use RealObject.set
RegisteredURL to associate an object to a URL and use getRegisteredURL to
retrieve it. The RO might not even be able to identify itself with the URL,
and long term, it might make sense to build a URL validation into the RO.
For the time being, the strategy is implemented in LC, while long term
the ROServer should provide a (filtered, approved, . . . ) list of published
objects. The server can pass references in two ways:
String[] RMIURLs = RemoteObjectServer.getActors();
RemoteObject[] remObjects = RemoteObjectServer.getActors();
Once a client has a direct reference, the server can only disconnect it by
unexporting the ROClient .
Acting Server Objects
Up to this point, the ServerObject was introduced as the controller to the
remote object, with the option to forward the controlled data via its remote
 
Search WWH ::




Custom Search