/** * @see org.objectweb.fractal.api.control.LifeCycleController#startFc() */ @LifeCycle() public void startFcHandler() throws IllegalLifeCycleException { if (matrix == null) { throw new IllegalLifeCycleException("Matrix size has not been set"); } }
/** * @see org.objectweb.fractal.juliac.fraclet.control.lifecycle.FracletLifeCycleControllerMixin#invoke(java.lang.reflect.Method) */ private void invoke(final java.lang.reflect.Method method) throws org.objectweb.fractal.api.control.IllegalLifeCycleException { try { method.invoke(fcContent); } catch (java.lang.IllegalAccessException e) { org.objectweb.fractal.api.control.IllegalLifeCycleException ilce = new org.objectweb.fractal.api.control.IllegalLifeCycleException(""); ilce.initCause(e); throw ilce; } catch (java.lang.reflect.InvocationTargetException e) { org.objectweb.fractal.api.control.IllegalLifeCycleException ilce = new org.objectweb.fractal.api.control.IllegalLifeCycleException(""); ilce.initCause(e); throw ilce; } }
@java.lang.Override public void run() { try { invoke(method); } catch (org.objectweb.fractal.api.control.IllegalLifeCycleException ilce) { ilce.printStackTrace(); } } }.start();
/** * Stop the component and then calls the overriden method. */ public void undeploy() throws UndeploymentException { if (_this_weaveableOptLC != null) { if (LifeCycleController.STARTED.equals(_this_weaveableOptLC .getFcState())) { try { _this_weaveableOptLC.stopFc(); } catch (IllegalLifeCycleException e) { throw new ChainedUndeploymentException(e, _this_weaveableC, e.getMessage()); } } } _super_undeploy(); }
/** * @see org.ow2.frascati.tinfi.control.intent.LifeCycleIntentMixin#checkFcStopped() */ private void checkFcStopped() throws org.objectweb.fractal.api.control.IllegalLifeCycleException { if ((weaveableOptLC) != null) { java.lang.String state = weaveableOptLC.getFcState(); if (!(org.objectweb.fractal.api.control.LifeCycleController.STOPPED.equals(state))) { java.lang.String msg = ("Component " + (weaveableOptNC.getFcName())) + " is not stopped"; throw new org.objectweb.fractal.api.control.IllegalLifeCycleException(msg); } } }
public boolean setFcStopped() throws IllegalLifeCycleException { synchronized (this) { boolean b = _super_setFcStopped(); if (b) { try { _this_weaveableSCACC.stop(); } catch( ContentInstantiationException ie ) { IllegalLifeCycleException icle = new IllegalLifeCycleException(ie.getMessage()); icle.initCause(ie); throw icle; } } return b; } }
/** * @see org.ow2.frascati.tinfi.control.content.SCAContentControllerMixin#setFcContent(java.lang.Object) */ public void setFcContent(Object content) throws IllegalLifeCycleException, ContentInstantiationException { String state = weaveableOptLC.getFcState(); if (!(state.equals(LifeCycleController.STOPPED))) { String msg = "Component should be stopped"; throw new IllegalLifeCycleException(msg); } sm.setFcContent(content); }
/** * @see org.ow2.frascati.tinfi.control.lifecycle.SCALifeCycleMixin#setFcStopped() */ public boolean setFcStopped() throws org.objectweb.fractal.api.control.IllegalLifeCycleException { synchronized(this) { boolean b = setFcStopped$0(); if (b) { try { weaveableSCACC.stop(); } catch (org.ow2.frascati.tinfi.api.control.ContentInstantiationException ie) { org.objectweb.fractal.api.control.IllegalLifeCycleException icle = new org.objectweb.fractal.api.control.IllegalLifeCycleException(ie.getMessage()); icle.initCause(ie); throw icle; } } return b; } }
/** * @see org.ow2.frascati.tinfi.control.content.LifeCycleSCAContentMixin#setFcContent(java.lang.Object) */ public void setFcContent(java.lang.Object content) throws org.objectweb.fractal.api.control.IllegalLifeCycleException, org.ow2.frascati.tinfi.api.control.ContentInstantiationException { java.lang.String state = weaveableOptLC.getFcState(); if (!(state.equals(org.objectweb.fractal.api.control.LifeCycleController.STOPPED))) { java.lang.String msg = "Component should be stopped"; throw new org.objectweb.fractal.api.control.IllegalLifeCycleException(msg); } setFcContent$0(content); }
/** * @see org.ow2.frascati.tinfi.control.lifecycle.SCALifeCycleMixin#setFcContentState(boolean) */ public void setFcContentState(boolean started) throws IllegalLifeCycleException { try { if (started) { weaveableSCACC.eagerInit(); weaveableSCACC.start(); } else { weaveableSCACC.stop(); } } catch (ContentInstantiationException ie) { IllegalLifeCycleException icle = new IllegalLifeCycleException(ie.getMessage()); icle.initCause(ie); throw icle; } }
/** * @see org.ow2.frascati.tinfi.control.intent.LifeCycleIntentMixin#checkFcStopped() */ private void checkFcStopped() throws IllegalLifeCycleException { if ((weaveableOptLC) != null) { String state = weaveableOptLC.getFcState(); if (!(LifeCycleController.STOPPED.equals(state))) { String msg = ("Component " + (weaveableOptNC.getFcName())) + " is not stopped"; throw new IllegalLifeCycleException(msg); } } }
public boolean setFcStarted() throws IllegalLifeCycleException { synchronized (this) { boolean b = _super_setFcStarted(); if (b) { try { _this_weaveableSCACC.eagerInit(); _this_weaveableSCACC.start(); } catch( ContentInstantiationException ie ) { IllegalLifeCycleException icle = new IllegalLifeCycleException(ie.getMessage()); icle.initCause(ie); throw icle; } } return b; } }
/** * @see org.ow2.frascati.tinfi.control.intent.LifeCycleIntentMixin#checkFcStopped() */ private void checkFcStopped() throws org.objectweb.fractal.api.control.IllegalLifeCycleException { if ((weaveableOptLC) != null) { java.lang.String state = weaveableOptLC.getFcState(); if (!(org.objectweb.fractal.api.control.LifeCycleController.STOPPED.equals(state))) { java.lang.String msg = ("Component " + (weaveableOptNC.getFcName())) + " is not stopped"; throw new org.objectweb.fractal.api.control.IllegalLifeCycleException(msg); } } }
/** * @see org.ow2.frascati.tinfi.control.lifecycle.SCALifeCycleMixin#setFcStarted() */ public boolean setFcStarted() throws org.objectweb.fractal.api.control.IllegalLifeCycleException { synchronized(this) { boolean b = setFcStarted$0(); if (b) { try { weaveableSCACC.eagerInit(); weaveableSCACC.start(); } catch (org.ow2.frascati.tinfi.api.control.ContentInstantiationException ie) { org.objectweb.fractal.api.control.IllegalLifeCycleException icle = new org.objectweb.fractal.api.control.IllegalLifeCycleException(ie.getMessage()); icle.initCause(ie); throw icle; } } return b; } }
/** * @see AbstractComponent#beforeFirstStart(Component) */ @DreamLifeCycle(on = DreamLifeCycleType.FIRST_START) protected void beforeFirstStart(Component componentItf) throws IllegalLifeCycleException { try { Map<String, Object> hints = new HashMap<String, Object>(); hints.put("thread", "pool"); Util.addTask(componentItf, readerTask, hints); } catch (Exception e) { throw new IllegalLifeCycleException("Can't add task"); } }
public void setFcContent( Object content ) throws IllegalLifeCycleException, ContentInstantiationException { /* * Lifecycle check. */ String state = _this_weaveableOptLC.getFcState(); if( ! state.equals(LifeCycleController.STOPPED) ) { String msg = "Component should be stopped"; throw new IllegalLifeCycleException(msg); } _super_setFcContent(content); }
private void checkFcStopped() throws IllegalLifeCycleException { if( _this_weaveableOptLC != null ) { String state = _this_weaveableOptLC.getFcState(); if( ! LifeCycleController.STOPPED.equals(state) ) { String msg = "Component " + _this_weaveableOptNC.getFcName() + " is not stopped"; throw new IllegalLifeCycleException(msg); } } }
public void setFcContentClass( Class<?> c ) throws IllegalLifeCycleException, ContentInstantiationException { /* * Lifecycle check. */ String state = _this_weaveableOptLC.getFcState(); if( ! state.equals(LifeCycleController.STOPPED) ) { String msg = "Component should be stopped"; throw new IllegalLifeCycleException(msg); } _super_setFcContentClass(c); }
/** * @see org.ow2.frascati.tinfi.control.content.LifeCycleSCAContentMixin#setFcContentClass(java.lang.Class<?>) */ public void setFcContentClass(java.lang.Class<?> c) throws org.objectweb.fractal.api.control.IllegalLifeCycleException, org.ow2.frascati.tinfi.api.control.ContentInstantiationException { java.lang.String state = weaveableOptLC.getFcState(); if (!(state.equals(org.objectweb.fractal.api.control.LifeCycleController.STOPPED))) { java.lang.String msg = "Component should be stopped"; throw new org.objectweb.fractal.api.control.IllegalLifeCycleException(msg); } setFcContentClass$0(c); }
/** * Add the TCP/IP listen task */ @DreamLifeCycle(on = DreamLifeCycleType.FIRST_START) protected void beforeFirstStart(Component componentItf) throws IllegalLifeCycleException { try { this.logger.log(BasicLevel.DEBUG, "First start of the component : TCP/IP listen task added"); final Map<String, Object> hints = new HashMap<String, Object>(); hints.put("thread", "pool"); Util.addTask(componentItf, this.listenTask, hints); } catch (final Exception e) { throw new IllegalLifeCycleException("Can't add TCP/IP listen task"); } }