Files
narya/src/java/com/threerings/presents/net/AuthResponse.java
T
Michael Bayne 89d073b13c Switched package from com.samskivert to com.threerings.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@12 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-05-30 23:58:31 +00:00

66 lines
1.5 KiB
Java

//
// $Id: AuthResponse.java,v 1.5 2001/05/30 23:58:31 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.net.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;
}