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);
}
}
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);
}
}
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);
}
}
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);
}
}
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);
}
}
Aggregations