More work on invocation manager; modified startup sequence so that server

can get shit together before bootstrapping the client.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@68 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-07-19 07:09:16 +00:00
parent 6663aae772
commit 915f3db6f1
15 changed files with 371 additions and 129 deletions
@@ -1,5 +1,5 @@
//
// $Id: AuthResponse.java,v 1.6 2001/06/11 17:42:20 mdb Exp $
// $Id: AuthResponse.java,v 1.7 2001/07/19 07:09:16 mdb Exp $
package com.threerings.cocktail.cher.net;
@@ -30,7 +30,7 @@ public class AuthResponse extends DownstreamMessage
}
/**
* Constructs a auth response with the supplied credentials.
* Constructs a auth response with the supplied response data.
*/
public AuthResponse (AuthResponseData data)
{
@@ -1,12 +1,8 @@
//
// $Id: AuthResponseData.java,v 1.5 2001/07/19 05:56:20 mdb Exp $
// $Id: AuthResponseData.java,v 1.6 2001/07/19 07:09:16 mdb Exp $
package com.threerings.cocktail.cher.net;
import java.io.IOException;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import com.threerings.cocktail.cher.dobj.DObject;
/**
@@ -23,12 +19,6 @@ public class AuthResponseData extends DObject
*/
public String code;
/** The oid of this client's associated distributed object. */
public int clientOid;
/** The oid to which to send invocation requests. */
public int invOid;
public String toString ()
{
return "[code=" + code + "]";
@@ -0,0 +1,26 @@
//
// $Id: BootstrapData.java,v 1.1 2001/07/19 07:09:16 mdb Exp $
package com.threerings.cocktail.cher.net;
import com.threerings.cocktail.cher.dobj.DObject;
/**
* An <code>BootstrapData</code> object is communicated back to the client
* after authentication has succeeded and after the server is fully
* prepared to deal with the client. It contains information the client
* will need to interact with the server.
*/
public class BootstrapData extends DObject
{
/** The oid of this client's associated distributed object. */
public int clientOid;
/** The oid to which to send invocation requests. */
public int invOid;
public String toString ()
{
return "[clientOid=" + clientOid + ", invOid=" + invOid + "]";
}
}
@@ -0,0 +1,67 @@
//
// $Id: BootstrapNotification.java,v 1.1 2001/07/19 07:09:16 mdb Exp $
package com.threerings.cocktail.cher.net;
import java.io.IOException;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import com.threerings.cocktail.cher.dobj.io.DObjectFactory;
/**
* A bootstrap notification is delivered to the client once the server has
* fully initialized itself in preparation for dealing with this client.
* The authentication process completes very early and further information
* need be communicated to the client so that it can fully interact with
* the server. This information is communicated via the bootstrap
* notification.
*/
public class BootstrapNotification extends DownstreamMessage
{
/** The code for a bootstrap notification. */
public static final short TYPE = TYPE_BASE + 1;
/**
* Zero argument constructor used when unserializing an instance.
*/
public BootstrapNotification ()
{
super();
}
/**
* Constructs an bootstrap notification with the supplied data.
*/
public BootstrapNotification (BootstrapData data)
{
_data = data;
}
public short getType ()
{
return TYPE;
}
public BootstrapData getData ()
{
return _data;
}
public void writeTo (DataOutputStream out)
throws IOException
{
super.writeTo(out);
DObjectFactory.writeTo(out, _data);
}
public void readFrom (DataInputStream in)
throws IOException
{
super.readFrom(in);
_data = (BootstrapData)DObjectFactory.readFrom(in);
}
/** The data associated with this notification. */
protected BootstrapData _data;
}
@@ -1,5 +1,5 @@
//
// $Id: EventNotification.java,v 1.7 2001/06/11 17:44:04 mdb Exp $
// $Id: EventNotification.java,v 1.8 2001/07/19 07:09:16 mdb Exp $
package com.threerings.cocktail.cher.net;
@@ -13,7 +13,7 @@ import com.threerings.cocktail.cher.io.TypedObjectFactory;
public class EventNotification extends DownstreamMessage
{
/** The code for an event notification. */
public static final short TYPE = TYPE_BASE + 1;
public static final short TYPE = TYPE_BASE + 2;
/**
* Zero argument constructor used when unserializing an instance.
@@ -1,5 +1,5 @@
//
// $Id: FailureResponse.java,v 1.4 2001/06/09 23:39:04 mdb Exp $
// $Id: FailureResponse.java,v 1.5 2001/07/19 07:09:16 mdb Exp $
package com.threerings.cocktail.cher.net;
@@ -9,7 +9,7 @@ import java.io.DataOutputStream;
public class FailureResponse extends DownstreamMessage
{
/** The code for a logoff notification. */
/** The code for a failure notification. */
public static final short TYPE = TYPE_BASE + 4;
/**
@@ -1,5 +1,5 @@
//
// $Id: ObjectResponse.java,v 1.8 2001/06/11 17:42:20 mdb Exp $
// $Id: ObjectResponse.java,v 1.9 2001/07/19 07:09:16 mdb Exp $
package com.threerings.cocktail.cher.net;
@@ -13,7 +13,7 @@ import com.threerings.cocktail.cher.dobj.io.DObjectFactory;
public class ObjectResponse extends DownstreamMessage
{
/** The code for an object repsonse. */
public static final short TYPE = TYPE_BASE + 2;
public static final short TYPE = TYPE_BASE + 3;
/**
* Zero argument constructor used when unserializing an instance.