Bit the bullet and implemented invocation service groups so that our various
MetaSOY clients (Swiftly, World, and soon Admin Dashboard) don't have to know about a bunch of unrelated crap. Fricking complexity++, grumble. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4551 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -21,8 +21,12 @@
|
||||
|
||||
package com.threerings.presents.net;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.TimeZone;
|
||||
|
||||
/**
|
||||
* Used to authenticate with the server.
|
||||
*/
|
||||
public class AuthRequest extends UpstreamMessage
|
||||
{
|
||||
/**
|
||||
@@ -34,14 +38,14 @@ public class AuthRequest extends UpstreamMessage
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a auth request with the supplied credentials and client
|
||||
* version information.
|
||||
* Constructs a auth request with the supplied credentials and client version information.
|
||||
*/
|
||||
public AuthRequest (Credentials creds, String version)
|
||||
public AuthRequest (Credentials creds, String version, HashSet<String> bootGroups)
|
||||
{
|
||||
_creds = creds;
|
||||
_version = version;
|
||||
_zone = TimeZone.getDefault().getID();
|
||||
_bootGroups = bootGroups.toArray(new String[bootGroups.size()]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -53,8 +57,7 @@ public class AuthRequest extends UpstreamMessage
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a reference to the version information provided with this
|
||||
* request.
|
||||
* Returns a reference to the version information provided with this request.
|
||||
*/
|
||||
public String getVersion ()
|
||||
{
|
||||
@@ -69,6 +72,14 @@ public class AuthRequest extends UpstreamMessage
|
||||
return TimeZone.getTimeZone(_zone);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the set of bootstrap service groups in which this client is interested.
|
||||
*/
|
||||
public String[] getBootGroups ()
|
||||
{
|
||||
return _bootGroups;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a string representation of this instance.
|
||||
*/
|
||||
@@ -86,4 +97,7 @@ public class AuthRequest extends UpstreamMessage
|
||||
|
||||
/** The timezone in which this client is operating. */
|
||||
protected String _zone;
|
||||
|
||||
/** The set of bootstrap service groups this client is interested in. */
|
||||
protected String[] _bootGroups;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@ package com.threerings.presents.net;
|
||||
import com.threerings.io.SimpleStreamableObject;
|
||||
import com.threerings.util.StreamableArrayList;
|
||||
|
||||
import com.threerings.presents.data.InvocationMarshaller;
|
||||
|
||||
/**
|
||||
* A <code>BootstrapData</code> object is communicated back to the client
|
||||
* after authentication has succeeded and after the server is fully
|
||||
@@ -36,5 +38,5 @@ public class BootstrapData extends SimpleStreamableObject
|
||||
public int clientOid;
|
||||
|
||||
/** A list of handles to invocation services. */
|
||||
public StreamableArrayList services;
|
||||
public StreamableArrayList<InvocationMarshaller> services;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user