com.anabas.sharedlet
Class DefaultSharedletImpl

java.lang.Object
  |
  +--com.anabas.sharedlet.DefaultSharedletImpl

public class DefaultSharedletImpl
extends java.lang.Object
implements Sharedlet

This is an implementation of Sharedlet class that is used by DefaultSharedletManager to store sharedlet session logic & view information. It is the access point for containers to get sharedlet view & session logic instances.

Sharedlet developer may extend this class and override its functionality as necessary.


Constructor Summary
DefaultSharedletImpl(java.lang.String mimeType)
           
 
Method Summary
 SharedletSessionLogic getSessionLogic(java.lang.String id)
          Proxy function for sharedlet manager's getSessionLogic().
 SharedletView getView(java.lang.String id)
          Find the view instance inside the view manager and return it.
 void loadDocument(java.net.URL url)
          The default sharedlet doesn't support any document types....so no saving.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSharedletImpl

public DefaultSharedletImpl(java.lang.String mimeType)
Parameters:
mimeType - The MIME type of the sharedlet (i.e. application/x-sharedlet-???)
Method Detail

getView

public SharedletView getView(java.lang.String id)
Find the view instance inside the view manager and return it.
Specified by:
getView in interface Sharedlet
Parameters:
id - The id returned by SharedletViewInfo.getID().
Returns:
The sharedlet view associated with the particular id. null if the view does not exist.

getSessionLogic

public SharedletSessionLogic getSessionLogic(java.lang.String id)
Proxy function for sharedlet manager's getSessionLogic().
Specified by:
getSessionLogic in interface Sharedlet
Parameters:
id - The id returned by SharedletSessionLogic.getID().

loadDocument

public void loadDocument(java.net.URL url)
The default sharedlet doesn't support any document types....so no saving. Override this function if the sharedlet will support document loading. The url passed to the sharedlet is guaranteed to be of the type supported by it [ as returned by SharedletInfo.getSupportedDocumentTypes() ]
Specified by:
loadDocument in interface Sharedlet
Parameters:
url - The url of the document to load.