From b7e16c86f5f2986bed4875247fda981a9d79cbf1 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Sun, 11 Feb 2007 03:08:04 +0000 Subject: [PATCH] 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 --- src/java/com/threerings/presents/client/Client.java | 8 ++++++++ src/java/com/threerings/presents/client/Communicator.java | 2 +- src/java/com/threerings/presents/net/AuthRequest.java | 5 ++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/java/com/threerings/presents/client/Client.java b/src/java/com/threerings/presents/client/Client.java index 536b3be47..b6dde2f06 100644 --- a/src/java/com/threerings/presents/client/Client.java +++ b/src/java/com/threerings/presents/client/Client.java @@ -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. null is returned if no such service diff --git a/src/java/com/threerings/presents/client/Communicator.java b/src/java/com/threerings/presents/client/Communicator.java index 49641023a..bdd7686d7 100644 --- a/src/java/com/threerings/presents/client/Communicator.java +++ b/src/java/com/threerings/presents/client/Communicator.java @@ -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 diff --git a/src/java/com/threerings/presents/net/AuthRequest.java b/src/java/com/threerings/presents/net/AuthRequest.java index 7a21b5721..5961b59ba 100644 --- a/src/java/com/threerings/presents/net/AuthRequest.java +++ b/src/java/com/threerings/presents/net/AuthRequest.java @@ -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 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; } /**