|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.aop.framework.ProxyConfig
org.springframework.aop.framework.AdvisedSupport
org.springframework.aop.framework.ProxyCreatorSupport
org.springframework.aop.framework.ProxyFactoryBean
org.sakaiproject.entitybroker.util.ReloadableComponentProxy
public class ReloadableComponentProxy
WARNING: Requires Spring 1.2.8 or newer libraries in the classpath
Allows you to define a Sakai component in a webapp so it can be reloaded,
this makes development easier since it does not require all of Sakai to be restarted
and yet allows you to expose beans to the Sakai component manager
WARNING: This is currently experimental as your bean will not be able to be found by the component
manager while things are starting up (since your webapp will not have loaded up yet),
it is basically only useful for development and some testing right now
How to use:
1) Create a bean for the service you want to proxy in your webapp application context (example: myLocalBean)
2) Create a bean in your webapp like so:
ComponentManager.get(Class) to load up the proxied bean in the service/thing that is using your service
at the point where it is used (not in the init or it will fail):
| Field Summary |
|---|
| Fields inherited from class org.springframework.aop.framework.ProxyFactoryBean |
|---|
GLOBAL_SUFFIX, logger |
| Fields inherited from class org.springframework.aop.framework.AdvisedSupport |
|---|
EMPTY_TARGET_SOURCE |
| Constructor Summary | |
|---|---|
ReloadableComponentProxy()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
void |
setLocalSakaiComponentBean(Object localSakaiComponentBean)
|
void |
setSakaiComponentName(String sakaiComponentName)
|
| Methods inherited from class org.springframework.aop.framework.ProxyFactoryBean |
|---|
adviceChanged, createCompositeInterface, getObject, getObjectType, getProxy, isSingleton, setAdvisorAdapterRegistry, setAutodetectInterfaces, setBeanClassLoader, setBeanFactory, setFrozen, setInterceptorNames, setProxyClassLoader, setProxyInterfaces, setSingleton, setTargetName |
| Methods inherited from class org.springframework.aop.framework.ProxyCreatorSupport |
|---|
addListener, createAopProxy, getAopProxyFactory, isActive, removeListener, setAopProxyFactory |
| Methods inherited from class org.springframework.aop.framework.AdvisedSupport |
|---|
addAdvice, addAdvice, addAdvisor, addAdvisor, addAllAdvisors, addInterface, adviceIncluded, copyConfigurationFrom, copyConfigurationFrom, countAdvicesOfType, getAdvisorChainFactory, getAdvisors, getAdvisorsInternal, getInterceptorsAndDynamicInterceptionAdvice, getProxiedInterfaces, getTargetClass, getTargetSource, indexOf, indexOf, isInterfaceProxied, isPreFiltered, removeAdvice, removeAdvisor, removeAdvisor, removeInterface, replaceAdvisor, setAdvisorChainFactory, setInterfaces, setPreFiltered, setTarget, setTargetClass, setTargetSource, toProxyConfigString, toString, updateAdvisorArray |
| Methods inherited from class org.springframework.aop.framework.ProxyConfig |
|---|
copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setOpaque, setOptimize, setProxyTargetClass |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.springframework.aop.framework.Advised |
|---|
isExposeProxy, isFrozen, isProxyTargetClass, setExposeProxy |
| Constructor Detail |
|---|
public ReloadableComponentProxy()
| Method Detail |
|---|
public void setSakaiComponentName(String sakaiComponentName)
sakaiComponentName - (optional) the name to use for this bean in the component manager,
if unset then this will use the name of the registered proxyInterfacepublic void setLocalSakaiComponentBean(Object localSakaiComponentBean)
localSakaiComponentBean - this is the bean which you want to expose via the proxy
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||