Files
narya/src/java/com/threerings/presents/net/AuthResponse.java
T
Michael Bayne 33d93d3374 Har! More progress mateys.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-05-29 03:27:59 +00:00

66 lines
1.5 KiB
Java

//
// $Id: AuthResponse.java,v 1.3 2001/05/29 03:27:59 mdb Exp $
package com.samskivert.cocktail.cher.net;
import java.io.IOException;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import com.samskivert.cocktail.cher.dobj.DObjectFactory;
/**
* The auth response communicates authentication success or failure as
* well as associated information via a distribted object transmitted
* along with the response. The distributed object simply serves as a
* container for the varied and manifold data involved in the
* authentication process.
*/
public class AuthResponse extends DownstreamMessage
{
/** The code for an auth response. */
public static final short TYPE = TYPE_BASE + 0;
/**
* Zero argument constructor used when unserializing an instance.
*/
public AuthResponse ()
{
super();
}
/**
* Constructs a auth response with the supplied credentials.
*/
public AuthResponse (AuthResponseData data)
{
_data = data;
}
public AuthResponseData getData ()
{
return _data;
}
public short getType ()
{
return TYPE;
}
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 = (AuthResponseData)DObjectFactory.readFrom(in);
}
protected AuthResponseData _data;
}