Examples of ScanState


Examples of com.sun.jmx.examples.scandir.ScanManagerMXBean.ScanState

                }
            }
        };
        NotificationFilter filter = null;
        Object handback = null;
        final ScanState before;
        final NotificationEmitter emitter = (NotificationEmitter)
                makeNotificationEmitter(proxy,DirectoryScannerMXBean.class);
        emitter.addNotificationListener(listener, filter, handback);
        before = proxy.getState();
        op.call();
View Full Code Here

Examples of com.sun.jmx.examples.scandir.ScanManagerMXBean.ScanState

        bean.setRootDirectory(System.getProperty("java.io.tmpdir"));
        final ResultLogManager log = new ResultLogManager();
        DirectoryScanner instance =
                new DirectoryScanner(bean,log);
       
        ScanState expResult = STOPPED;
        ScanState result = instance.getState();
        assertEquals(STOPPED, result);
        instance.scan();
        result = instance.getState();
        assertEquals(COMPLETED, result);
    }
View Full Code Here

Examples of com.sun.jmx.examples.scandir.ScanManagerMXBean.ScanState

                }
            }
        };
        NotificationFilter filter = null;
        Object handback = null;
        final ScanState before;
        final NotificationEmitter emitter = (NotificationEmitter)proxy;
        emitter.addNotificationListener(listener, filter, handback);
        before = proxy.getState();
        op.call();
        try {
View Full Code Here

Examples of com.sun.jmx.examples.scandir.ScanManagerMXBean.ScanState

    public void testGetState() throws IOException, InstanceNotFoundException {
        System.out.println("getState");
       
        ScanManager instance = new ScanManager();
       
        ScanState expResult = ScanState.STOPPED;
        ScanState result = instance.getState();
        assertEquals(expResult, result);
        instance.start();
        final ScanState afterStart = instance.getState();
        assertContained(EnumSet.of(RUNNING,SCHEDULED,COMPLETED),afterStart);
        instance.stop();
        assertEquals(STOPPED,instance.getState());
        instance.schedule(1000000L,1000000L);
        assertEquals(SCHEDULED,instance.getState());
View Full Code Here

Examples of com.sun.jmx.examples.scandir.ScanManagerMXBean.ScanState

                }
            }
        };
        NotificationFilter filter = null;
        Object handback = null;
        final ScanState before;
        final NotificationEmitter emitter = (NotificationEmitter)proxy;
        emitter.addNotificationListener(listener, filter, handback);
        before = proxy.getState();
        op.call();
        try {
View Full Code Here

Examples of com.sun.jmx.examples.scandir.ScanManagerMXBean.ScanState

    public void testGetState() throws IOException, InstanceNotFoundException {
        System.out.println("getState");
       
        ScanManager instance = new ScanManager();
       
        ScanState expResult = ScanState.STOPPED;
        ScanState result = instance.getState();
        assertEquals(expResult, result);
        instance.start();
        final ScanState afterStart = instance.getState();
        assertContained(EnumSet.of(RUNNING,SCHEDULED,COMPLETED),afterStart);
        instance.stop();
        assertEquals(STOPPED,instance.getState());
        instance.schedule(1000000L,1000000L);
        assertEquals(SCHEDULED,instance.getState());
View Full Code Here

Examples of fr.soleil.salsa.entity.ScanState

     * @param scanServerName
     * @return
     * @throws SalsaDeviceException
     */
    public ScanState getScanState(String scanServerName) throws SalsaDeviceException {
        ScanState state = ScanState.STOPPED;

        String stateString = DeviceConnectionManager.getDeviceState(scanServerName);
        if (StateUtilities.getNameForState(DevState.ON).equals(stateString)) {
            state = ScanState.STOPPED;
        }
View Full Code Here

Examples of fr.soleil.salsa.entity.ScanState

     * @return A {@link ScanState}. If there is a problem with the given Scan Server, the default
     *         value {@link ScanState#STOPPED} is returned
     * @throws SalsaDeviceException If <code>scanServerName</code> is <code>null</code>
     */
    public static ScanState getScanState(String scanServerName) throws SalsaDeviceException {
        ScanState state = ScanApi.getScanState(scanServerName);
        LOGGER.info("{}.getScanState({})={}", SalsaAPI.class.getSimpleName(), scanServerName, state);
        return state;
    }
View Full Code Here

Examples of fr.soleil.salsa.entity.ScanState

     * @return
     * @throws SalsaDeviceException
     */
    public ScanState getScanState(String scanServerName) throws SalsaDeviceException {
        DeviceProxy scanServerProxy;
        ScanState state;
        scanServerProxy = getScanServerProxy(scanServerName);
        try {
            DeviceAttribute stateAttribute = scanServerProxy.read_attribute("State");
            String stateString = AttributeHelper.extractToString(stateAttribute);
            if ("ON".equals(stateString)) {
View Full Code Here

Examples of fr.soleil.salsa.entity.ScanState

     * @return
     * @throws SalsaDeviceException
     */
    public ScanState getScanState(String scanServerName) throws SalsaDeviceException {
        DeviceProxy scanServerProxy;
        ScanState state;
        scanServerProxy = getScanServerProxy(scanServerName);
        try {
            DeviceAttribute stateAttribute = scanServerProxy.read_attribute("State");
            String stateString = AttributeHelper.extractToString(stateAttribute);
            if ("ON".equals(stateString)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.