net.sf.sail.core.beans
Class SessionContext

java.lang.Object
  extended by java.beans.beancontext.BeanContextChildSupport
      extended by java.beans.beancontext.BeanContextSupport
          extended by java.beans.beancontext.BeanContextServicesSupport
              extended by net.sf.sail.core.beans.SessionContext
All Implemented Interfaces:
java.beans.beancontext.BeanContext, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextServiceRevokedListener, java.beans.beancontext.BeanContextServices, java.beans.beancontext.BeanContextServicesListener, java.beans.DesignMode, java.beans.PropertyChangeListener, java.beans.VetoableChangeListener, java.beans.Visibility, java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.EventListener

public class SessionContext
extends java.beans.beancontext.BeanContextServicesSupport

Provides services to beans within the pod. Allows beans and pods to listen for session events. a life cycle manager for sail. The parent bean for all javabeans.

Author:
turadg AUDIT07-
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.beans.beancontext.BeanContextServicesSupport
java.beans.beancontext.BeanContextServicesSupport.BCSSChild, java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider, java.beans.beancontext.BeanContextServicesSupport.BCSSServiceProvider
 
Nested classes/interfaces inherited from class java.beans.beancontext.BeanContextSupport
java.beans.beancontext.BeanContextSupport.BCSChild, java.beans.beancontext.BeanContextSupport.BCSIterator
 
Field Summary
static boolean exitOnClose
           
protected  java.util.Date startTime
           
protected  java.util.Date stopTime
           
 
Fields inherited from class java.beans.beancontext.BeanContextServicesSupport
bcsListeners, proxy, serializable, services
 
Fields inherited from class java.beans.beancontext.BeanContextSupport
bcmListeners, children, designTime, locale, okToUseGui
 
Fields inherited from class java.beans.beancontext.BeanContextChildSupport
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport
 
Fields inherited from interface java.beans.beancontext.BeanContext
globalHierarchyLock
 
Fields inherited from interface java.beans.DesignMode
PROPERTYNAME
 
Constructor Summary
SessionContext()
           
 
Method Summary
 void addSessionEventListener(SessionEventListener sel)
           
 void addUser(User user)
           
protected  void dumpPersistance()
           
protected  void fireSessionEvent(SessionEvent se)
           
 Offering getOffering()
           
 long getOffsetMilliseconds()
           
 SessionDataService getSessionDataService()
           
 SessionUuid getSessionId()
           
 SessionService getSessionService()
          Again this is a something that seems hacky.
 java.util.Date getStartTime()
           
 java.util.Date getStopTime()
           
 long getTimeDifference()
           
 void initiate()
           
 void initStartTime()
           
 void setOffering(Offering offering)
           
 void setProperty(java.lang.String key, java.lang.String value)
          This is a hack until all this service mess is cleaned up
 void setSessionDataService(SessionDataService sessionDataService)
           
 void setSessionId(SessionUuid sessionId)
           
 void start()
           
 java.lang.String toString()
           
 void tryToTerminate()
           
 
Methods inherited from class java.beans.beancontext.BeanContextServicesSupport
addBeanContextServicesListener, addService, addService, bcsPreDeserializationHook, bcsPreSerializationHook, childJustRemovedHook, createBCSChild, createBCSSServiceProvider, fireServiceAdded, fireServiceAdded, fireServiceRevoked, fireServiceRevoked, getBeanContextServicesPeer, getChildBeanContextServicesListener, getCurrentServiceClasses, getCurrentServiceSelectors, getService, hasService, initialize, initializeBeanContextResources, releaseBeanContextResources, releaseService, removeBeanContextServicesListener, revokeService, serviceAvailable, serviceRevoked
 
Methods inherited from class java.beans.beancontext.BeanContextSupport
add, addAll, addBeanContextMembershipListener, avoidingGui, bcsChildren, childDeserializedHook, childJustAddedHook, classEquals, clear, contains, containsAll, containsKey, copyChildren, deserialize, dontUseGui, fireChildrenAdded, fireChildrenRemoved, getBeanContextPeer, getChildBeanContextChild, getChildBeanContextMembershipListener, getChildPropertyChangeListener, getChildSerializable, getChildVetoableChangeListener, getChildVisibility, getLocale, getResource, getResourceAsStream, instantiateChild, isDesignTime, isEmpty, isSerializing, iterator, needsGui, okToUseGui, propertyChange, readChildren, remove, remove, removeAll, removeBeanContextMembershipListener, retainAll, serialize, setDesignTime, setLocale, size, toArray, toArray, validatePendingAdd, validatePendingRemove, vetoableChange, writeChildren
 
Methods inherited from class java.beans.beancontext.BeanContextChildSupport
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, isDelegated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, validatePendingSetBeanContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.beans.beancontext.BeanContext
addBeanContextMembershipListener, getResource, getResourceAsStream, instantiateChild, removeBeanContextMembershipListener
 
Methods inherited from interface java.beans.beancontext.BeanContextChild
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.beans.DesignMode
isDesignTime, setDesignTime
 
Methods inherited from interface java.beans.Visibility
avoidingGui, dontUseGui, needsGui, okToUseGui
 

Field Detail

startTime

protected java.util.Date startTime

stopTime

protected java.util.Date stopTime

exitOnClose

public static boolean exitOnClose
Constructor Detail

SessionContext

public SessionContext()
Method Detail

getOffering

public Offering getOffering()

setOffering

public void setOffering(Offering offering)

addSessionEventListener

public void addSessionEventListener(SessionEventListener sel)

fireSessionEvent

protected void fireSessionEvent(SessionEvent se)

addUser

public void addUser(User user)

initiate

public void initiate()

start

public void start()

tryToTerminate

public void tryToTerminate()

getStartTime

public java.util.Date getStartTime()

initStartTime

public void initStartTime()

getTimeDifference

public long getTimeDifference()

getStopTime

public java.util.Date getStopTime()

getSessionId

public SessionUuid getSessionId()

setSessionId

public void setSessionId(SessionUuid sessionId)

getSessionDataService

public SessionDataService getSessionDataService()

setSessionDataService

public void setSessionDataService(SessionDataService sessionDataService)

setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)
This is a hack until all this service mess is cleaned up

Parameters:
key -
value -

getSessionService

public SessionService getSessionService()
Again this is a something that seems hacky. Hopefully it can be clarified when the service mess is cleaned up or clarified.


getOffsetMilliseconds

public long getOffsetMilliseconds()
Returns:
milliseconds since the session started

dumpPersistance

protected void dumpPersistance()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2004-2008 TELS Center. All Rights Reserved.