/** * @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; } }
/** * @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.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.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.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); } } }
/** * @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 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"); } }
/** * @see org.ow2.frascati.tinfi.control.content.SCAContentControllerMixin#setFcContentClass(java.lang.Class) */ public void setFcContentClass(Class<?> c) throws IllegalLifeCycleException, ContentInstantiationException { String state = weaveableOptLC.getFcState(); if (!(state.equals(LifeCycleController.STOPPED))) { String msg = "Component should be stopped"; throw new IllegalLifeCycleException(msg); } try { innerSetFcContentClass(c); } catch (IllegalContentClassMetaData e) { throw new ContentInstantiationException(e); } }
/** * Method executed during the first start of the component */ @DreamLifeCycle(on = DreamLifeCycleType.FIRST_START) protected void beforeFirstStart(Component componentItf) throws IllegalLifeCycleException { this.logger .log(BasicLevel.DEBUG, "First start of the component : TCP/IP reader task added"); try { final Map<String, Object> hints = new HashMap<String, Object>(); hints.put("thread", "pool"); Util.addTask(componentItf, this.readerTask, hints); } catch (final Exception e) { logger.log(BasicLevel.FATAL, e); throw new IllegalLifeCycleException("Can't add task"); } this.exceptionChunkFactory = this.messageManagerItf.getChunkFactory(ExceptionChunk.class); }
/** * Export the channel */ @LifeCycle(on = LifeCycleType.START) protected void startFcHandler() throws IllegalLifeCycleException { LoggerUtil.call(this.logger); try { this.lowerOutgoingPush = this.lowerProtocolItf.export(null, null); } catch (final ExportException e) { throw new IllegalLifeCycleException("Unable to export access point : " + e.getMessage()); } }
/** * @see org.objectweb.fractal.api.control.LifeCycleController#startFc() */ @LifeCycle(on = LifeCycleType.START) public void start() throws IllegalLifeCycleException { log = new LoggingUtil(logger); try { initContexts(); } catch (JBIException e) { throw new IllegalLifeCycleException(e.getMessage()); } }
/** * Export the channel */ @LifeCycle(on = LifeCycleType.START) protected void startFcHandler() throws IllegalLifeCycleException { LoggerUtil.start(logger); try { Map<String, Object> hints = new HashMap<String, Object>(); hints.put(MessagePassingProtocol.FROM_CHUNK_NAME, fromChunkName); lowerOutgoingPush = lowerProtocolItf.export((IncomingPush) weaveableC .getFcInterface(INCOMING_IN_PUSH_ITF_NAME), hints); } catch (ExportException e) { throw new IllegalLifeCycleException("Unable to export access point : " + e.getMessage()); } catch (NoSuchInterfaceException e) { Error.bug(logger, e); } LoggerUtil.end(logger); }
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.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; } }