org.ow2.frascati.binding.http.ServletManagerInterceptorSCALCb56bb98SCACCIntent Maven / Gradle / Ivy
/*
* Generated by: org.ow2.frascati.tinfi.opt.oo.InterceptorClassGenerator
* on: Thu Aug 19 19:00:52 CEST 2010
*/
package org.ow2.frascati.binding.http;
public class ServletManagerInterceptorSCALCb56bb98SCACCIntent
extends org.ow2.frascati.tinfi.TinfiComponentInterceptor
implements org.ow2.frascati.binding.http.ServletManager,org.objectweb.fractal.julia.Interceptor {
private juliac.generated.SCALifeCycleControllerImpl _lc;
private static java.lang.reflect.Method[] METHODS;
public ServletManagerInterceptorSCALCb56bb98SCACCIntent() {
}
private ServletManagerInterceptorSCALCb56bb98SCACCIntent(Object obj) {
setFcItfDelegate(obj);
}
public void initFcController(org.objectweb.fractal.julia.InitializationContext ic) throws org.objectweb.fractal.api.factory.InstantiationException {
super.initFcController(ic);
Object olc = ic.getInterface("lifecycle-controller");
if( ! (olc instanceof juliac.generated.SCALifeCycleControllerImpl) ) {
while( olc instanceof org.objectweb.fractal.julia.Interceptor ) {
olc = ((org.objectweb.fractal.julia.Interceptor)olc).getFcItfDelegate();
}
}
_lc = (juliac.generated.SCALifeCycleControllerImpl) olc;
initIntentHandlersMap(METHODS);
}
public Object clone() {
ServletManagerInterceptorSCALCb56bb98SCACCIntent clone = new ServletManagerInterceptorSCALCb56bb98SCACCIntent(getFcItfDelegate());
initFcClone(clone);
clone._lc = _lc;
return clone;
}
public void unregisterServlet(final java.lang.String arg0) {
synchronized(_lc) {
if(_lc.fcState != 2)
_lc.incrementFcInvocationCounter();
else
_lc.fcInvocationCounter++;
}
try {
org.ow2.frascati.binding.http.ServletManager impl = pushFcAndGet("servlet-manager",org.ow2.frascati.binding.http.ServletManager.class,this);
try {
java.util.List handlers = intentHandlersMap.get(METHODS[1]);
try {
if( handlers.size() == 0 ) {
impl.unregisterServlet(arg0);
}
else {
org.ow2.frascati.tinfi.control.component.ReconfigurableComponentContext compctx = getFcCompCtxCtrlItf();
org.objectweb.fractal.api.Interface itf = getFcItf();
org.ow2.frascati.tinfi.control.intent.IntentJoinPointImpl ijp = new org.ow2.frascati.tinfi.control.intent.IntentJoinPointImpl();
ijp.init(handlers,compctx,itf,impl,METHODS[1],arg0);
ijp.proceed();
Object ret = null;
}
}
catch( Throwable t ) {
if( t instanceof RuntimeException ) {
throw (RuntimeException) t;
}
throw new org.ow2.frascati.tinfi.TinfiRuntimeException(t);
}
}
finally {
releaseFcAndPop(impl,false);
}
}
finally {
synchronized(_lc) {
if(_lc.fcState != 2)
_lc.decrementFcInvocationCounter();
else
_lc.fcInvocationCounter--;
}
}
}
public void registerServlet(final java.lang.String arg0,final javax.servlet.Servlet arg1) {
synchronized(_lc) {
if(_lc.fcState != 2)
_lc.incrementFcInvocationCounter();
else
_lc.fcInvocationCounter++;
}
try {
org.ow2.frascati.binding.http.ServletManager impl = pushFcAndGet("servlet-manager",org.ow2.frascati.binding.http.ServletManager.class,this);
try {
java.util.List handlers = intentHandlersMap.get(METHODS[0]);
try {
if( handlers.size() == 0 ) {
impl.registerServlet(arg0,arg1);
}
else {
org.ow2.frascati.tinfi.control.component.ReconfigurableComponentContext compctx = getFcCompCtxCtrlItf();
org.objectweb.fractal.api.Interface itf = getFcItf();
org.ow2.frascati.tinfi.control.intent.IntentJoinPointImpl ijp = new org.ow2.frascati.tinfi.control.intent.IntentJoinPointImpl();
ijp.init(handlers,compctx,itf,impl,METHODS[0],arg0,arg1);
ijp.proceed();
Object ret = null;
}
}
catch( Throwable t ) {
if( t instanceof RuntimeException ) {
throw (RuntimeException) t;
}
throw new org.ow2.frascati.tinfi.TinfiRuntimeException(t);
}
}
finally {
releaseFcAndPop(impl,false);
}
}
finally {
synchronized(_lc) {
if(_lc.fcState != 2)
_lc.decrementFcInvocationCounter();
else
_lc.fcInvocationCounter--;
}
}
}
static {
try {
METHODS = new java.lang.reflect.Method[]{
org.ow2.frascati.binding.http.ServletManager.class.getMethod("registerServlet",java.lang.String.class,javax.servlet.Servlet.class),
org.ow2.frascati.binding.http.ServletManager.class.getMethod("unregisterServlet",java.lang.String.class),
};
}
catch( NoSuchMethodException e ) {
throw new org.ow2.frascati.tinfi.TinfiRuntimeException(e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy