Search in sources :

Example 1 with CouldntAccessPropertyEx

use of alma.ACSErrTypeCommon.CouldntAccessPropertyEx in project ACS by ACS-Community.

the class DataPrinter method startSample.

/**
	 * Starts the sampling, connecting to ACS Manager and the Sampling Manager.
	 * @throws CouldntAccessComponentEx Component wasn't available at the time.
	 * @throws TypeNotSupportedEx Sampling Manager specific exception. Some types are currently not supported in acssamp.
	 * @throws CouldntAccessPropertyEx
	 */
public void startSample() throws CouldntAccessComponentEx, TypeNotSupportedEx, CouldntAccessPropertyEx, SamplingManagerException {
    samp = new Sampler();
    synchronized (this) {
        System.out.println("Initialization:" + initializations);
        if (initializations == 0) {
            try {
                spinUp(SampTool.NAME, ssg.MAN_NAME);
            } catch (AcsInformationException e) {
                System.out.print(e.getMessage());
                System.exit(-1);
            } catch (SamplingManagerException e) {
                System.out.print(e.getMessage());
                System.exit(-1);
            } catch (AcsJContainerEx e) {
                System.out.println(e.getMessage());
                System.exit(-1);
            }
        }
        initializations++;
    }
    try {
        SamplingManagerUITool.startSample(new SampDetail(component, property, (long) this.frequency, reportRate));
    } catch (alma.ACSErrTypeCommon.CouldntAccessComponentEx e) {
        setComponentAvailable(false, "Cannot access component implementation");
        throw e;
    } catch (alma.ACSErrTypeCommon.TypeNotSupportedEx e) {
        setComponentAvailable(false, "Type not supported");
        throw e;
    } catch (CouldntAccessPropertyEx e) {
        setComponentAvailable(false, "Cannot access the property");
        throw e;
    } catch (SamplingManagerException e) {
        setComponentAvailable(false, e.getMessage());
        throw e;
    }
    samp.start();
}
Also used : AcsJContainerEx(alma.JavaContainerError.wrappers.AcsJContainerEx) CouldntAccessComponentEx(alma.ACSErrTypeCommon.CouldntAccessComponentEx) SampDetail(cl.utfsm.samplingSystemUI.core.SampDetail) TypeNotSupportedEx(alma.ACSErrTypeCommon.TypeNotSupportedEx) AcsInformationException(cl.utfsm.samplingSystemUI.core.AcsInformationException) CouldntAccessPropertyEx(alma.ACSErrTypeCommon.CouldntAccessPropertyEx) SamplingManagerException(cl.utfsm.samplingSystemUI.core.SamplingManagerException)

Aggregations

CouldntAccessComponentEx (alma.ACSErrTypeCommon.CouldntAccessComponentEx)1 CouldntAccessPropertyEx (alma.ACSErrTypeCommon.CouldntAccessPropertyEx)1 TypeNotSupportedEx (alma.ACSErrTypeCommon.TypeNotSupportedEx)1 AcsJContainerEx (alma.JavaContainerError.wrappers.AcsJContainerEx)1 AcsInformationException (cl.utfsm.samplingSystemUI.core.AcsInformationException)1 SampDetail (cl.utfsm.samplingSystemUI.core.SampDetail)1 SamplingManagerException (cl.utfsm.samplingSystemUI.core.SamplingManagerException)1