All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.objectweb.fractal.api.control.BindingControllerInterceptorIntent Maven / Gradle / Ivy
/*
* Generated by: org.ow2.frascati.tinfi.opt.oo.InterceptorClassGenerator
* on: Fri Jan 15 16:55:14 CET 2010
*/
package org.objectweb.fractal.api.control;
public class BindingControllerInterceptorIntent
extends org.ow2.frascati.tinfi.TinfiComponentInterceptor
implements org.objectweb.fractal.api.control.BindingController,org.objectweb.fractal.julia.Interceptor {
private static java.lang.reflect.Method[] METHODS;
private static class IntentJoinPointImplForMethod0
extends org.ow2.frascati.tinfi.control.intent.IntentJoinPointImpl {
public Object proceed() throws Throwable {
if( index == handlers.size() ) {
return intentTarget.listFc();
}
else {
return super.proceed();
}
}
}
private static class IntentJoinPointImplForMethod1
extends org.ow2.frascati.tinfi.control.intent.IntentJoinPointImpl {
public Object proceed() throws Throwable {
if( index == handlers.size() ) {
return intentTarget.lookupFc((java.lang.String)intentMethodArguments[0]);
}
else {
return super.proceed();
}
}
}
private static class IntentJoinPointImplForMethod2
extends org.ow2.frascati.tinfi.control.intent.IntentJoinPointImpl {
public Object proceed() throws Throwable {
if( index == handlers.size() ) {
intentTarget.bindFc((java.lang.String)intentMethodArguments[0],intentMethodArguments[1]);
return null;
}
else {
return super.proceed();
}
}
}
private static class IntentJoinPointImplForMethod3
extends org.ow2.frascati.tinfi.control.intent.IntentJoinPointImpl {
public Object proceed() throws Throwable {
if( index == handlers.size() ) {
intentTarget.unbindFc((java.lang.String)intentMethodArguments[0]);
return null;
}
else {
return super.proceed();
}
}
}
public BindingControllerInterceptorIntent() {
}
public BindingControllerInterceptorIntent(Object obj) {
setFcItfDelegate(obj);
}
public void initFcController(org.objectweb.fractal.julia.InitializationContext ic) throws org.objectweb.fractal.api.factory.InstantiationException {
initIntentHandlersMap(METHODS);
super.initFcController(ic);
}
public Object clone() {
BindingControllerInterceptorIntent clone = new BindingControllerInterceptorIntent(getFcItfDelegate());
initFcClone(clone);
return clone;
}
public java.lang.String[] listFc() {
java.util.List handlers = intentHandlersMap.get(METHODS[0]);
try {
if( handlers.size() == 0 ) {
java.lang.String[] ret = impl.listFc();
return ret;
}
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 IntentJoinPointImplForMethod0();
ijp.init(handlers,compctx,itf,impl,METHODS[0]);
java.lang.String[] ret = (java.lang.String[]) ijp.proceed();
return ret;
}
}
catch( Throwable t ) {
if( t instanceof RuntimeException ) {
throw (RuntimeException) t;
}
throw new org.ow2.frascati.tinfi.TinfiRuntimeException(t);
}
}
public java.lang.Object lookupFc(final java.lang.String arg0) throws org.objectweb.fractal.api.NoSuchInterfaceException {
java.util.List handlers = intentHandlersMap.get(METHODS[1]);
try {
if( handlers.size() == 0 ) {
java.lang.Object ret = impl.lookupFc(arg0);
return ret;
}
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 IntentJoinPointImplForMethod1();
ijp.init(handlers,compctx,itf,impl,METHODS[1],arg0);
java.lang.Object ret = ijp.proceed();
return ret;
}
}
catch( Throwable t ) {
if( t instanceof org.objectweb.fractal.api.NoSuchInterfaceException ) {
throw (org.objectweb.fractal.api.NoSuchInterfaceException) t;
}
if( t instanceof RuntimeException ) {
throw (RuntimeException) t;
}
throw new org.ow2.frascati.tinfi.TinfiRuntimeException(t);
}
}
public void bindFc(final java.lang.String arg0,final java.lang.Object arg1) throws org.objectweb.fractal.api.NoSuchInterfaceException,org.objectweb.fractal.api.control.IllegalBindingException,org.objectweb.fractal.api.control.IllegalLifeCycleException {
java.util.List handlers = intentHandlersMap.get(METHODS[2]);
try {
if( handlers.size() == 0 ) {
impl.bindFc(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 IntentJoinPointImplForMethod2();
ijp.init(handlers,compctx,itf,impl,METHODS[2],arg0,arg1);
ijp.proceed();
Object ret = null;
}
}
catch( Throwable t ) {
if( t instanceof org.objectweb.fractal.api.NoSuchInterfaceException ) {
throw (org.objectweb.fractal.api.NoSuchInterfaceException) t;
}
if( t instanceof org.objectweb.fractal.api.control.IllegalBindingException ) {
throw (org.objectweb.fractal.api.control.IllegalBindingException) t;
}
if( t instanceof org.objectweb.fractal.api.control.IllegalLifeCycleException ) {
throw (org.objectweb.fractal.api.control.IllegalLifeCycleException) t;
}
if( t instanceof RuntimeException ) {
throw (RuntimeException) t;
}
throw new org.ow2.frascati.tinfi.TinfiRuntimeException(t);
}
}
public void unbindFc(final java.lang.String arg0) throws org.objectweb.fractal.api.NoSuchInterfaceException,org.objectweb.fractal.api.control.IllegalBindingException,org.objectweb.fractal.api.control.IllegalLifeCycleException {
java.util.List handlers = intentHandlersMap.get(METHODS[3]);
try {
if( handlers.size() == 0 ) {
impl.unbindFc(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 IntentJoinPointImplForMethod3();
ijp.init(handlers,compctx,itf,impl,METHODS[3],arg0);
ijp.proceed();
Object ret = null;
}
}
catch( Throwable t ) {
if( t instanceof org.objectweb.fractal.api.NoSuchInterfaceException ) {
throw (org.objectweb.fractal.api.NoSuchInterfaceException) t;
}
if( t instanceof org.objectweb.fractal.api.control.IllegalBindingException ) {
throw (org.objectweb.fractal.api.control.IllegalBindingException) t;
}
if( t instanceof org.objectweb.fractal.api.control.IllegalLifeCycleException ) {
throw (org.objectweb.fractal.api.control.IllegalLifeCycleException) t;
}
if( t instanceof RuntimeException ) {
throw (RuntimeException) t;
}
throw new org.ow2.frascati.tinfi.TinfiRuntimeException(t);
}
}
static {
try {
METHODS = new java.lang.reflect.Method[]{
org.objectweb.fractal.api.control.BindingController.class.getMethod("listFc"),
org.objectweb.fractal.api.control.BindingController.class.getMethod("lookupFc",java.lang.String.class),
org.objectweb.fractal.api.control.BindingController.class.getMethod("bindFc",java.lang.String.class,java.lang.Object.class),
org.objectweb.fractal.api.control.BindingController.class.getMethod("unbindFc",java.lang.String.class),
};
}
catch( NoSuchMethodException e ) {
throw new org.ow2.frascati.tinfi.TinfiRuntimeException(e);
}
}
}