Search in sources :

Example 21 with ComponentLifecycleException

use of alma.acs.component.ComponentLifecycleException in project ACS by ACS-Community.

the class SimpleMasterComponentImpl method initialize.

/**
	 * @see alma.acs.component.ComponentLifecycle#initialize(alma.acs.container.ContainerServices)
	 */
public void initialize(ContainerServices containerServices) throws ComponentLifecycleException {
    super.initialize(containerServices);
    try {
        CurrentStateHierarchyDataAccess csha = new CurrentStateHierarchyDataAccess(this, new String[] { "SpecialState", "BoringState", "StatelessState", "InvalidState" }, 2);
        // currentStateHierarchy
        ROstringSeqImpl currentStateHierarchyImpl = new ROstringSeqImpl("currentStateHierarchy", this, csha);
        ROstringSeqPOATie currentStateHierarchyTie = new ROstringSeqPOATie(currentStateHierarchyImpl);
        currentStateHierarchy = ROstringSeqHelper.narrow(this.registerProperty(currentStateHierarchyImpl, currentStateHierarchyTie));
    } catch (Throwable th) {
        throw new ComponentLifecycleException("Failed to create properties.", th);
    }
}
Also used : ROstringSeqImpl(alma.ACS.impl.ROstringSeqImpl) ROstringSeqPOATie(alma.ACS.ROstringSeqPOATie) ComponentLifecycleException(alma.acs.component.ComponentLifecycleException)

Example 22 with ComponentLifecycleException

use of alma.acs.component.ComponentLifecycleException in project ACS by ACS-Community.

the class SeqComponentImpl method initialize.

/**
	 * @see alma.acs.component.ComponentLifecycle#initialize(alma.acs.container.ContainerServices)
	 */
public void initialize(ContainerServices containerServices) throws ComponentLifecycleException {
    super.initialize(containerServices);
    try {
        DataAccess currentDataAccess = new MemoryDataAccess();
        DataAccess currentDataAccess2 = new MemoryDataAccess();
        DataAccess currentDataAccess3 = new MemoryDataAccess();
        ROlongSeqImpl readbackLongSeqImpl = new ROlongSeqImpl("longSeqRO", this, new readbackLongSeqDataAccess());
        ROlongSeqPOATie readbackLongSeqTie = new ROlongSeqPOATie(readbackLongSeqImpl);
        longSeqRO = ROlongSeqHelper.narrow(this.registerProperty(readbackLongSeqImpl, readbackLongSeqTie));
        RWlongSeqImpl readbackLongSeqRWImpl = new RWlongSeqImpl("longSeqRW", this, currentDataAccess2);
        RWlongSeqPOATie readbackLongSeqRWTie = new RWlongSeqPOATie(readbackLongSeqRWImpl);
        longSeqRW = RWlongSeqHelper.narrow(this.registerProperty(readbackLongSeqRWImpl, readbackLongSeqRWTie));
        ROdoubleSeqImpl readbackDoubleSeqImpl = new ROdoubleSeqImpl("doubleSeqRO", this, new readbackDoubleSeqDataAccess());
        ROdoubleSeqPOATie readbackDoubleSeqTie = new ROdoubleSeqPOATie(readbackDoubleSeqImpl);
        doubleSeqRO = ROdoubleSeqHelper.narrow(this.registerProperty(readbackDoubleSeqImpl, readbackDoubleSeqTie));
        RWdoubleSeqImpl readbackDoubleSeqRWImpl = new RWdoubleSeqImpl("doubleSeqRW", this, currentDataAccess);
        RWdoubleSeqPOATie readbackDoubleSeqRWTie = new RWdoubleSeqPOATie(readbackDoubleSeqRWImpl);
        doubleSeqRW = RWdoubleSeqHelper.narrow(this.registerProperty(readbackDoubleSeqRWImpl, readbackDoubleSeqRWTie));
        ROfloatSeqImpl readbackFloatSeqImpl = new ROfloatSeqImpl("floatSeqRO", this, new readbackFloatSeqDataAccess());
        ROfloatSeqPOATie readbackFloatSeqTie = new ROfloatSeqPOATie(readbackFloatSeqImpl);
        floatSeqRO = ROfloatSeqHelper.narrow(this.registerProperty(readbackFloatSeqImpl, readbackFloatSeqTie));
        RWfloatSeqImpl readbackFloatSeqRWImpl = new RWfloatSeqImpl("floatSeqRW", this, currentDataAccess3);
        RWfloatSeqPOATie readbackFloatSeqRWTie = new RWfloatSeqPOATie(readbackFloatSeqRWImpl);
        floatSeqRW = RWfloatSeqHelper.narrow(this.registerProperty(readbackFloatSeqRWImpl, readbackFloatSeqRWTie));
        ROpatternImpl statusImpl = new ROpatternImpl("status", this, new StatusDataAccess());
        ROpatternPOATie statusTie = new ROpatternPOATie(statusImpl);
        status = ROpatternHelper.narrow(this.registerProperty(statusImpl, statusTie));
    } catch (Throwable th) {
        throw new ComponentLifecycleException("Failed to create properties.", th);
    }
}
Also used : RWdoubleSeqPOATie(alma.ACS.RWdoubleSeqPOATie) ROfloatSeqPOATie(alma.ACS.ROfloatSeqPOATie) RWlongSeqPOATie(alma.ACS.RWlongSeqPOATie) ROfloatSeqImpl(alma.ACS.impl.ROfloatSeqImpl) RWdoubleSeqImpl(alma.ACS.impl.RWdoubleSeqImpl) ComponentLifecycleException(alma.acs.component.ComponentLifecycleException) MemoryDataAccess(alma.ACS.jbaci.MemoryDataAccess) ROlongSeqPOATie(alma.ACS.ROlongSeqPOATie) MemoryDataAccess(alma.ACS.jbaci.MemoryDataAccess) DataAccess(alma.ACS.jbaci.DataAccess) ROdoubleSeqImpl(alma.ACS.impl.ROdoubleSeqImpl) RWfloatSeqPOATie(alma.ACS.RWfloatSeqPOATie) ROpatternPOATie(alma.ACS.ROpatternPOATie) RWfloatSeqImpl(alma.ACS.impl.RWfloatSeqImpl) ROpatternImpl(alma.ACS.impl.ROpatternImpl) ROdoubleSeqPOATie(alma.ACS.ROdoubleSeqPOATie) RWlongSeqImpl(alma.ACS.impl.RWlongSeqImpl) ROlongSeqImpl(alma.ACS.impl.ROlongSeqImpl)

Example 23 with ComponentLifecycleException

use of alma.acs.component.ComponentLifecycleException in project ACS by ACS-Community.

the class EventSupplierCDBChannel method initialize.

/**
	 * Sets up the SimpleSupplier.
	 * 
	 * @param containerServices
	 *            Services to components.
	 * @throws ComponentLifecycleException
	 *             Not thrown.
	 */
public void initialize(ContainerServices containerServices) throws ComponentLifecycleException {
    super.initialize(containerServices);
    m_logger.info("initialize() called...");
    try {
        // Instantiate our supplier
        // THIS IS THE SOLE LINE DIFFERENT FROM EventSupplierImpl. THIS IS
        // EXACTLY THE SAME IMPLEMENTATION EXCEPT THAT THIS SUPPLIER CREATES
        // A CHANNEL DEFINED IN THE CDB
        // We cast to NCPublisher because this tests uses special method that are not part of the Corba-NC-independent interface.
        m_supplier = (NCPublisher) m_containerServices.createNotificationChannelPublisher("cdb_channel", EventDescription.class);
    } catch (Exception e) {
        e.printStackTrace(System.err);
        throw new ComponentLifecycleException(e);
    }
}
Also used : ComponentLifecycleException(alma.acs.component.ComponentLifecycleException) ComponentLifecycleException(alma.acs.component.ComponentLifecycleException)

Example 24 with ComponentLifecycleException

use of alma.acs.component.ComponentLifecycleException in project ACS by ACS-Community.

the class EventSupplierImpl method initialize.

/** Sets up the NCPublisher.
	 * @param containerServices Services to components.
	 * @throws ComponentLifecycleException Not thrown.
	 */
public void initialize(ContainerServices containerServices) throws ComponentLifecycleException {
    super.initialize(containerServices);
    try {
        //Instantiate our supplier
        AcsEventPublisher<IDLEntity> pubIF = containerServices.createNotificationChannelPublisher("blar", IDLEntity.class);
        // For special testing, we cast to the expected publisher impl class (normally not needed)
        m_supplier = (NCPublisher<IDLEntity>) pubIF;
        m_logger.info("NCPublisher for 'blar' channel created.");
    } catch (Exception e) {
        throw new ComponentLifecycleException(e);
    }
}
Also used : ComponentLifecycleException(alma.acs.component.ComponentLifecycleException) IDLEntity(org.omg.CORBA.portable.IDLEntity) ComponentLifecycleException(alma.acs.component.ComponentLifecycleException)

Example 25 with ComponentLifecycleException

use of alma.acs.component.ComponentLifecycleException in project ACS by ACS-Community.

the class EventSupplierImpl method initialize.

/**
	 * Sets up the SimpleSupplier.
	 * 
	 * @param containerServices
	 *            Services to components.
	 * @throws ComponentLifecycleException
	 *             Not thrown.
	 */
public void initialize(ContainerServices containerServices) throws ComponentLifecycleException {
    super.initialize(containerServices);
    m_logger.info("initialize() called...");
    try {
        // Instantiate our supplier
        m_supplier = m_containerServices.createNotificationChannelPublisher("blarIL", EventDescription.class);
    } catch (Exception e) {
        e.printStackTrace(System.err);
        throw new ComponentLifecycleException(e);
    }
}
Also used : ComponentLifecycleException(alma.acs.component.ComponentLifecycleException) EventDescription(alma.acsnc.EventDescription) ComponentLifecycleException(alma.acs.component.ComponentLifecycleException)

Aggregations

ComponentLifecycleException (alma.acs.component.ComponentLifecycleException)30 MemoryDataAccess (alma.ACS.jbaci.MemoryDataAccess)4 AcsJContainerServicesEx (alma.JavaContainerError.wrappers.AcsJContainerServicesEx)4 AcsJException (alma.acs.exceptions.AcsJException)4 EventDescription (alma.acsnc.EventDescription)4 ROdoublePOATie (alma.ACS.ROdoublePOATie)3 ROpatternPOATie (alma.ACS.ROpatternPOATie)3 RWdoublePOATie (alma.ACS.RWdoublePOATie)3 ROdoubleImpl (alma.ACS.impl.ROdoubleImpl)3 ROpatternImpl (alma.ACS.impl.ROpatternImpl)3 RWdoubleImpl (alma.ACS.impl.RWdoubleImpl)3 DataAccess (alma.ACS.jbaci.DataAccess)3 AcsComponentClassLoader (alma.acs.classloading.AcsComponentClassLoader)3 ROstringSeqPOATie (alma.ACS.ROstringSeqPOATie)2 ROstringSeqImpl (alma.ACS.impl.ROstringSeqImpl)2 FRIDGE.temperatureDataBlockEvent (alma.FRIDGE.temperatureDataBlockEvent)2 Consumer (alma.acs.nc.Consumer)2 QueueFileHandler (alma.acs.xmlfilestore.common.QueueFileHandler)2 File (java.io.File)2 IDLEntity (org.omg.CORBA.portable.IDLEntity)2