edu.washington.cs.supple.application
Class AbstractSuppleApplicationSession

java.lang.Object
  extended byedu.washington.cs.supple.application.AbstractSuppleApplicationSession
All Implemented Interfaces:
SuppleApplicationSession
Direct Known Subclasses:
SimpleSession

public abstract class AbstractSuppleApplicationSession
extends java.lang.Object
implements SuppleApplicationSession

Default implementation of a SuppleApplicationSession. This abstract class requires implementations to provide the definition of getUi.

Author:
dbc1

Constructor Summary
protected AbstractSuppleApplicationSession(SuppleApplication application)
          Constructor.
 
Method Summary
 void addSessionListener(SessionListener listener)
           
 void close()
          Close the session
 SuppleApplication getApplication()
           
 Renderer getRenderer()
           
abstract  UiObject getUi()
          Get the "main" UI description - the UI to be rendered when the session opens.
 void setRenderer(Renderer renderer)
          Set the associated renderer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSuppleApplicationSession

protected AbstractSuppleApplicationSession(SuppleApplication application)
Constructor.

Parameters:
application -
Method Detail

getApplication

public final SuppleApplication getApplication()
Specified by:
getApplication in interface SuppleApplicationSession
Returns:
the associated application

getRenderer

public final Renderer getRenderer()
Specified by:
getRenderer in interface SuppleApplicationSession
Returns:
the associated renderer

setRenderer

public void setRenderer(Renderer renderer)
Description copied from interface: SuppleApplicationSession
Set the associated renderer. The application can use this renderer to "push" ui to the client. The behavior for calling this method after the renderer has already been set is undefined.

Specified by:
setRenderer in interface SuppleApplicationSession

getUi

public abstract UiObject getUi()
Description copied from interface: SuppleApplicationSession
Get the "main" UI description - the UI to be rendered when the session opens.

Specified by:
getUi in interface SuppleApplicationSession

close

public void close()
Description copied from interface: SuppleApplicationSession
Close the session

Specified by:
close in interface SuppleApplicationSession

addSessionListener

public void addSessionListener(SessionListener listener)
Specified by:
addSessionListener in interface SuppleApplicationSession