From 14d47f8c851e7b2e06ca9528dcf1bfbd7ea9bd9d Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 25 Jul 2001 00:51:05 +0000 Subject: [PATCH] Allow credentials to be set after creating the client. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@122 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/presents/client/Client.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/presents/client/Client.java b/src/java/com/threerings/presents/client/Client.java index 911ce972f..d7eeebb47 100644 --- a/src/java/com/threerings/presents/client/Client.java +++ b/src/java/com/threerings/presents/client/Client.java @@ -1,5 +1,5 @@ // -// $Id: Client.java,v 1.10 2001/07/19 18:08:20 mdb Exp $ +// $Id: Client.java,v 1.11 2001/07/25 00:51:05 mdb Exp $ package com.threerings.cocktail.cher.client; @@ -43,6 +43,12 @@ public class Client * be processed. The invoker can then queue that runnable up on the * AWT thread if it is so inclined to make life simpler for the rest * of the application. + * + * @param creds the credentials to use when logging on to the server. + * These can be null, but setCredentials must then be + * called before any call to logon. + * @param invoker an invoker that can be used to process incoming + * events. */ public Client (Credentials creds, Invoker invoker) { @@ -128,6 +134,16 @@ public class Client return _creds; } + /** + * Sets the credentials that will be used by this client to + * authenticate with the server. This should be done before any call + * to logon. + */ + public void setCredentials (Credentials creds) + { + _creds = creds; + } + /** * Returns the distributed object manager associated with this * session. This reference is only valid for the duration of the