org.beanfabrics.context
Class DefaultContext

java.lang.Object
  extended by org.beanfabrics.context.DefaultContext
All Implemented Interfaces:
Context
Direct Known Subclasses:
BnParentContext, ModelContext

public class DefaultContext
extends java.lang.Object
implements Context

Author:
Michael Karneim

Constructor Summary
DefaultContext()
           
 
Method Summary
 void addContextListener(ContextListener l)
           
 void addParent(Context parent)
           
<T> boolean
addService(java.lang.Class<? super T> type, T service)
           
 ServiceEntry findService(java.lang.Class type)
           
protected  void fireParentAdded(Context parent)
           
protected  void fireParentRemoved(Context parent)
           
protected  void fireServiceAdded(ServiceEntry entry)
           
protected  void fireServiceRemoved(ServiceEntry entry)
           
 java.util.List<Context> getParents()
           
<T> T
getService(java.lang.Class<? extends T> type)
           
 java.util.List<ServiceEntry> getServiceEntries()
           
 void removeContextListener(ContextListener l)
           
 void removeParent(Context parent)
           
 java.lang.Object removeService(java.lang.Class type)
           
protected  java.lang.Object removeServiceEntry(Context origin, java.lang.Class type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultContext

public DefaultContext()
Method Detail

getParents

public java.util.List<Context> getParents()
Specified by:
getParents in interface Context

addParent

public void addParent(Context parent)
Specified by:
addParent in interface Context

removeParent

public void removeParent(Context parent)
Specified by:
removeParent in interface Context

addContextListener

public void addContextListener(ContextListener l)
Specified by:
addContextListener in interface Context

removeContextListener

public void removeContextListener(ContextListener l)
Specified by:
removeContextListener in interface Context

fireParentAdded

protected void fireParentAdded(Context parent)

fireParentRemoved

protected void fireParentRemoved(Context parent)

fireServiceAdded

protected void fireServiceAdded(ServiceEntry entry)

fireServiceRemoved

protected void fireServiceRemoved(ServiceEntry entry)

addService

public <T> boolean addService(java.lang.Class<? super T> type,
                              T service)
Specified by:
addService in interface Context

removeServiceEntry

protected java.lang.Object removeServiceEntry(Context origin,
                                              java.lang.Class type)

removeService

public java.lang.Object removeService(java.lang.Class type)
Specified by:
removeService in interface Context

getServiceEntries

public java.util.List<ServiceEntry> getServiceEntries()
Specified by:
getServiceEntries in interface Context

findService

public ServiceEntry findService(java.lang.Class type)
Specified by:
findService in interface Context

getService

public <T> T getService(java.lang.Class<? extends T> type)
Specified by:
getService in interface Context


© 2010 by Michael Karneim, http://www.beanfabrics.org