edu.washington.cs.supple.application
Class AbstractSuppleApplication

java.lang.Object
  extended byedu.washington.cs.supple.application.AbstractSuppleApplication
All Implemented Interfaces:
SuppleApplication
Direct Known Subclasses:
Browser, SimpleApplication

public abstract class AbstractSuppleApplication
extends java.lang.Object
implements SuppleApplication

AbstractSuppleApplication provides default implementations of most SuppleApplication methods.

Author:
dbc1

Constructor Summary
AbstractSuppleApplication(java.lang.String id, java.lang.String displayName)
          Constructor.
 
Method Summary
abstract  SuppleApplicationSession createSession()
          Factory method to create an application session.
 java.lang.String getDisplayName()
           
 java.lang.String getId()
           
 void shutdown()
          Applications receive this signal when the containing application server is about to shutdown.
 void start()
          SuppleApplications receive this signal when they are first created by the containing application server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSuppleApplication

public AbstractSuppleApplication(java.lang.String id,
                                 java.lang.String displayName)
Constructor.

Method Detail

getDisplayName

public final java.lang.String getDisplayName()
Specified by:
getDisplayName in interface SuppleApplication
Returns:
the human readable name of the application

getId

public final java.lang.String getId()
Specified by:
getId in interface SuppleApplication
Returns:
the shortened name (identifier) for the application

createSession

public abstract SuppleApplicationSession createSession()
Description copied from interface: SuppleApplication
Factory method to create an application session.

Specified by:
createSession in interface SuppleApplication
Returns:
a new unique session

start

public void start()
Description copied from interface: SuppleApplication
SuppleApplications receive this signal when they are first created by the containing application server. Implementors can use this method to precreate objects and configuration that will be shared across application sessions.

Specified by:
start in interface SuppleApplication

shutdown

public void shutdown()
Description copied from interface: SuppleApplication
Applications receive this signal when the containing application server is about to shutdown. Implementors can use this method to dispose of shared resources or other cleanup tasks.

Specified by:
shutdown in interface SuppleApplication