Added getBootGroups() to Client, made use of it.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4555 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2007-02-11 03:08:04 +00:00
parent c2dbae4809
commit b7e16c86f5
3 changed files with 11 additions and 4 deletions
@@ -269,6 +269,14 @@ public class Client
_bootGroups.add(group);
}
/**
* Returns the set of bootstrap service groups needed by this client.
*/
public String[] getBootGroups ()
{
return _bootGroups.toArray(new String[_bootGroups.size()]);
}
/**
* Returns the first bootstrap service that could be located that implements the supplied
* {@link InvocationService} derivation. <code>null</code> is returned if no such service
@@ -479,7 +479,7 @@ public class Communicator
{
// construct an auth request and send it
AuthRequest req = new AuthRequest(
_client.getCredentials(), _client.getVersion(), _client._bootGroups);
_client.getCredentials(), _client.getVersion(), _client.getBootGroups());
sendMessage(req);
// now wait for the auth response
@@ -21,7 +21,6 @@
package com.threerings.presents.net;
import java.util.HashSet;
import java.util.TimeZone;
/**
@@ -40,12 +39,12 @@ public class AuthRequest extends UpstreamMessage
/**
* Constructs a auth request with the supplied credentials and client version information.
*/
public AuthRequest (Credentials creds, String version, HashSet<String> bootGroups)
public AuthRequest (Credentials creds, String version, String[] bootGroups)
{
_creds = creds;
_version = version;
_zone = TimeZone.getDefault().getID();
_bootGroups = bootGroups.toArray(new String[bootGroups.size()]);
_bootGroups = bootGroups;
}
/**