* To create an entry for your component in the Configuration Database, * copy the line below into a new entry in the file $ACS_CDB/MACI/Components/Components.xml * and modify the instance name of the component and the container: *
* Name="CHARACTERISTICCOMPONENT_1" Code="alma.ACS.CharacteristicComponentImpl.CharacteristicComponentComponentHelper" Type="IDL:alma/ACS/CharacteristicComponent:1.0" Container="frodoContainer" ImplLang="java" *
* @author alma-component-helper-generator-tool */ public class CharacteristicComponentComponentHelper extends ComponentHelper { /** * Constructor * @param containerLogger logger used only by the parent class. */ public CharacteristicComponentComponentHelper(Logger containerLogger) { super(containerLogger); } /** * @see alma.acs.container.ComponentHelper#_createComponentImpl() */ protected ComponentLifecycle _createComponentImpl() { return new CharacteristicComponentImpl(); } /** * @see alma.acs.container.ComponentHelper#_getPOATieClass() */ protected Class extends Servant> _getPOATieClass() { return CharacteristicComponentPOATie.class; } /** * @see alma.acs.container.ComponentHelper#getOperationsInterface() */ protected Class extends ACSComponentOperations> _getOperationsInterface() { return CharacteristicComponentOperations.class; } } JavaMonitorCollector-48a0b1906f25bc4daef823a70fb97ef1b6b01cf9/minimalComponent/src/astri/ 0000775 0000000 0000000 00000000000 14076522640 0030256 5 ustar 00root root 0000000 0000000 JavaMonitorCollector-48a0b1906f25bc4daef823a70fb97ef1b6b01cf9/minimalComponent/src/astri/minimal/ 0000775 0000000 0000000 00000000000 14076522640 0031704 5 ustar 00root root 0000000 0000000 DataAccess/ 0000775 0000000 0000000 00000000000 14076522640 0033620 5 ustar 00root root 0000000 0000000 JavaMonitorCollector-48a0b1906f25bc4daef823a70fb97ef1b6b01cf9/minimalComponent/src/astri/minimal RandomDataAccessSupport.java 0000664 0000000 0000000 00000002340 14076522640 0041213 0 ustar 00root root 0000000 0000000 JavaMonitorCollector-48a0b1906f25bc4daef823a70fb97ef1b6b01cf9/minimalComponent/src/astri/minimal/DataAccess /** * */ package astri.minimal.DataAccess; import java.util.Random; import alma.ACS.jbaci.DataAccessSupport; import alma.ACSErr.CompletionHolder; import alma.acs.exceptions.AcsJException; /** * @author claudio * */ public class RandomDataAccessSupport extends DataAccessSupport { private String variable = ""; double min = 2.0; double max = 50.0; /** * */ public RandomDataAccessSupport(String var) { variable = var; } /* (non-Javadoc) * @see alma.ACS.jbaci.DataAccess#get(alma.ACSErr.CompletionHolder) */ @Override public Object get(CompletionHolder completionHolder) throws AcsJException { Random rn = new Random(); if (variable.equals("foo")) { return rn.nextDouble() * ((Double)this.max - (Double)this.min) + (Double)this.min; } else { return 10.0; } } /* (non-Javadoc) * @see alma.ACS.jbaci.DataAccess#initializeValue() */ @Override public boolean initializeValue() { // TODO Auto-generated method stub return false; } /* (non-Javadoc) * @see alma.ACS.jbaci.DataAccess#set(java.lang.Object, alma.ACSErr.CompletionHolder) */ @Override public void set(Object value, CompletionHolder completion) throws AcsJException { // TODO Auto-generated method stub } } MinimalComponentImpl/ 0000775 0000000 0000000 00000000000 14076522640 0035720 5 ustar 00root root 0000000 0000000 JavaMonitorCollector-48a0b1906f25bc4daef823a70fb97ef1b6b01cf9/minimalComponent/src/astri/minimal MinimalComponentComponentHelper.java 0000664 0000000 0000000 00000005457 14076522640 0045072 0 ustar 00root root 0000000 0000000 JavaMonitorCollector-48a0b1906f25bc4daef823a70fb97ef1b6b01cf9/minimalComponent/src/astri/minimal/MinimalComponentImpl /* * ALMA - Atacama Large Millimiter Array * (c) European Southern Observatory, 2002 * Copyright by ESO (in the framework of the ALMA collaboration), * All rights reserved * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ package astri.minimal.MinimalComponentImpl; import java.util.logging.Logger; import org.omg.PortableServer.Servant; import alma.ACS.ACSComponentOperations; import alma.acs.component.ComponentLifecycle; import alma.acs.container.ComponentHelper; import astri.minimal.MinimalComponentOperations; import astri.minimal.MinimalComponentPOATie; import astri.minimal.MinimalComponentImpl.MinimalComponentImpl; /** * Component helper class. * Generated for convenience, but can be modified by the component developer. * Must therefore be treated like any other Java class (CVS, ...). *
* To create an entry for your component in the Configuration Database, * copy the line below into a new entry in the file $ACS_CDB/MACI/Components/Components.xml * and modify the instance name of the component and the container: *
* Name="MINIMALCOMPONENT_1" Code="astri.minimal.MinimalComponentImpl.MinimalComponentComponentHelper" Type="IDL:astri/minimal/MinimalComponent:1.0" Container="frodoContainer" ImplLang="java" *
* @author alma-component-helper-generator-tool */ public class MinimalComponentComponentHelper extends ComponentHelper { /** * Constructor * @param containerLogger logger used only by the parent class. */ public MinimalComponentComponentHelper(Logger containerLogger) { super(containerLogger); } /** * @see alma.acs.container.ComponentHelper#_createComponentImpl() */ protected ComponentLifecycle _createComponentImpl() { return new MinimalComponentImpl(); } /** * @see alma.acs.container.ComponentHelper#_getPOATieClass() */ protected Class extends Servant> _getPOATieClass() { return MinimalComponentPOATie.class; } /** * @see alma.acs.container.ComponentHelper#getOperationsInterface() */ protected Class extends ACSComponentOperations> _getOperationsInterface() { return MinimalComponentOperations.class; } } MinimalComponentComponentHelper.java.tpl 0000664 0000000 0000000 00000005457 14076522640 0045670 0 ustar 00root root 0000000 0000000 JavaMonitorCollector-48a0b1906f25bc4daef823a70fb97ef1b6b01cf9/minimalComponent/src/astri/minimal/MinimalComponentImpl /* * ALMA - Atacama Large Millimiter Array * (c) European Southern Observatory, 2002 * Copyright by ESO (in the framework of the ALMA collaboration), * All rights reserved * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ package astri.minimal.MinimalComponentImpl; import java.util.logging.Logger; import org.omg.PortableServer.Servant; import alma.ACS.ACSComponentOperations; import alma.acs.component.ComponentLifecycle; import alma.acs.container.ComponentHelper; import astri.minimal.MinimalComponentOperations; import astri.minimal.MinimalComponentPOATie; import astri.minimal.MinimalComponentImpl.MinimalComponentImpl; /** * Component helper class. * Generated for convenience, but can be modified by the component developer. * Must therefore be treated like any other Java class (CVS, ...). *
* To create an entry for your component in the Configuration Database, * copy the line below into a new entry in the file $ACS_CDB/MACI/Components/Components.xml * and modify the instance name of the component and the container: *
* Name="MINIMALCOMPONENT_1" Code="astri.minimal.MinimalComponentImpl.MinimalComponentComponentHelper" Type="IDL:astri/minimal/MinimalComponent:1.0" Container="frodoContainer" ImplLang="java" *
* @author alma-component-helper-generator-tool
*/
public class MinimalComponentComponentHelper extends ComponentHelper
{
/**
* Constructor
* @param containerLogger logger used only by the parent class.
*/
public MinimalComponentComponentHelper(Logger containerLogger)
{
super(containerLogger);
}
/**
* @see alma.acs.container.ComponentHelper#_createComponentImpl()
*/
protected ComponentLifecycle _createComponentImpl()
{
return new MinimalComponentImpl();
}
/**
* @see alma.acs.container.ComponentHelper#_getPOATieClass()
*/
protected Class extends Servant> _getPOATieClass()
{
return MinimalComponentPOATie.class;
}
/**
* @see alma.acs.container.ComponentHelper#getOperationsInterface()
*/
protected Class extends ACSComponentOperations> _getOperationsInterface()
{
return MinimalComponentOperations.class;
}
}
MinimalComponentImpl.java 0000664 0000000 0000000 00000005036 14076522640 0042662 0 ustar 00root root 0000000 0000000 JavaMonitorCollector-48a0b1906f25bc4daef823a70fb97ef1b6b01cf9/minimalComponent/src/astri/minimal/MinimalComponentImpl package astri.minimal.MinimalComponentImpl;
import java.util.logging.Logger;
import alma.ACS.ROdouble;
import alma.ACS.ROdoubleHelper;
import alma.ACS.ROdoublePOATie;
import alma.ACS.impl.CharacteristicComponentImpl;
import alma.ACS.impl.ROdoubleImpl;
import alma.ACS.jbaci.DataAccess;
import alma.acs.component.ComponentLifecycleException;
import alma.acs.container.ContainerServices;
import alma.maciErrType.wrappers.AcsJComponentCleanUpEx;
import astri.minimal.MinimalComponentOperations;
import astri.minimal.DataAccess.RandomDataAccessSupport;
/**
* @author Claudio Tanci
*
*/
public class MinimalComponentImpl extends CharacteristicComponentImpl implements
MinimalComponentOperations {
private ContainerServices m_containerServices;
private Logger m_logger;
protected ROdouble fooProp;
protected DataAccess fooDataAccess;
protected ROdouble barProp;
protected DataAccess barDataAccess;
/* (non-Javadoc)
* @see astri.minimal.MinimalComponentOperations#foo()
*/
@Override
public ROdouble foo() {
return fooProp;
}
/* (non-Javadoc)
* @see astri.minimal.MinimalComponentOperations#foo()
*/
@Override
public ROdouble bar() {
return barProp;
}
@Override
public String sayHello() {
m_logger.info("sayHello called");
String msg = "Hello";
return msg;
}
/* (non-Javadoc)
* @see alma.ACS.impl.CharacteristicComponentImpl#initialize(alma.acs.container.ContainerServices)
*/
@Override
public void initialize(ContainerServices containerServices)
throws ComponentLifecycleException {
m_containerServices = containerServices;
m_logger = m_containerServices.getLogger();
m_logger.info("inizialize() called...");
super.initialize(containerServices);
try {
// fooDataAccess = new MemoryDataAccess();
fooDataAccess = new RandomDataAccessSupport("foo");
ROdoubleImpl fooImpl = new ROdoubleImpl("foo", this, fooDataAccess);
ROdoublePOATie fooTie = new ROdoublePOATie(fooImpl);
fooProp = ROdoubleHelper.narrow(this.registerProperty(fooImpl, fooTie));
barDataAccess = new RandomDataAccessSupport("bar");
ROdoubleImpl barImpl = new ROdoubleImpl("bar", this, barDataAccess);
barProp = ROdoubleHelper.narrow(this.registerProperty(barImpl, new ROdoublePOATie(barImpl)));
} catch (Throwable th) {
throw new ComponentLifecycleException("Failed to create properties.", th);
}
}
/* (non-Javadoc)
* @see alma.ACS.impl.CharacteristicComponentImpl#cleanUp()
*/
@Override
public void cleanUp() throws AcsJComponentCleanUpEx {
// TODO Auto-generated method stub
super.cleanUp();
}
}
JavaMonitorCollector-48a0b1906f25bc4daef823a70fb97ef1b6b01cf9/minimalComponent/test/ 0000775 0000000 0000000 00000000000 14076522640 0027324 5 ustar 00root root 0000000 0000000 JavaMonitorCollector-48a0b1906f25bc4daef823a70fb97ef1b6b01cf9/minimalComponent/test/.DS_Store 0000664 0000000 0000000 00000014004 14076522640 0031006 0 ustar 00root root 0000000 0000000 Bud1 % C D Bfdscbool scbool @ € @ € @ € @ E % DSDB ` € @ € @ € @ JavaMonitorCollector-48a0b1906f25bc4daef823a70fb97ef1b6b01cf9/minimalComponent/test/CDB/ 0000775 0000000 0000000 00000000000 14076522640 0027714 5 ustar 00root root 0000000 0000000 JavaMonitorCollector-48a0b1906f25bc4daef823a70fb97ef1b6b01cf9/minimalComponent/test/CDB/.DS_Store 0000664 0000000 0000000 00000014004 14076522640 0031376 0 ustar 00root root 0000000 0000000 Bud1 % M A C Ifdscbool fdscbool @ € @ € @ € @ E % DSDB ` € @ € @ € @ JavaMonitorCollector-48a0b1906f25bc4daef823a70fb97ef1b6b01cf9/minimalComponent/test/CDB/MACI/ 0000775 0000000 0000000 00000000000 14076522640 0030425 5 ustar 00root root 0000000 0000000 .DS_Store 0000664 0000000 0000000 00000014004 14076522640 0032030 0 ustar 00root root 0000000 0000000 JavaMonitorCollector-48a0b1906f25bc4daef823a70fb97ef1b6b01cf9/minimalComponent/test/CDB/MACI Bud1 † o n e n t s
C o m p o n e n t sfdscbool @ € @ € @ € @ E † DSDB ` À @ € @ € @ Components/ 0000775 0000000 0000000 00000000000 14076522640 0032473 5 ustar 00root root 0000000 0000000 JavaMonitorCollector-48a0b1906f25bc4daef823a70fb97ef1b6b01cf9/minimalComponent/test/CDB/MACI Components.xml 0000664 0000000 0000000 00000001000 14076522640 0035331 0 ustar 00root root 0000000 0000000 JavaMonitorCollector-48a0b1906f25bc4daef823a70fb97ef1b6b01cf9/minimalComponent/test/CDB/MACI/Components