Created adapters for the ClientObserver and LocationObserver interfaces to

make handling just one or two of the callbacks for those interfaces
simpler.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@305 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-08-22 00:08:12 +00:00
parent 62309a966c
commit 0a1e364e03
2 changed files with 77 additions and 0 deletions
@@ -0,0 +1,42 @@
//
// $Id: ClientAdapter.java,v 1.1 2001/08/22 00:08:12 mdb Exp $
package com.threerings.cocktail.cher.client;
/**
* The client adapter makes life easier for client observer classes that
* only care about one or two of the client observer callbacks. They can
* either extend client adapter or create an anonymous class that extends
* it and overrides just the callbacks they care about.
*
* <p> Note that the client adapter defaults to always ratifying a call to
* {@link * #clientWillLogoff} by returning true.
*/
public class ClientAdapter implements ClientObserver
{
// documentation inherited
public void clientDidLogon (Client client)
{
}
// documentation inherited
public void clientFailedToLogon (Client client, Exception cause)
{
}
// documentation inherited
public void clientConnectionFailed (Client client, Exception cause)
{
}
// documentation inherited
public boolean clientWillLogoff (Client client)
{
return true;
}
// documentation inherited
public void clientDidLogoff (Client client)
{
}
}