Command RemObjPolling

@param devices deviceName,type= {attribute or command},name1, namei
@throws DevFailed
765780
@Command(name = "RemObjPolling", inTypeDesc = "Str[0]=Device name. Str[1]=Object type. Str[2]=Object name")
    public void removePolling(final String[] devices) throws DevFailed {
        xlogger.entry();
        if (devices.length < 3) {
            throw DevFailedUtils.newDevFailed(ExceptionMessages.WRONG_NR_ARGS, "Incorrect number of inout arguments");
        }
        final String deviceName = devices[0];
        final String type = devices[1];
        final String[] attributes = Arrays.copyOfRange(devices, 2, devices.length);
        for (final String attribute : attributes) {
            for (final DeviceClassBuilder deviceClass : classList) {
                if (deviceClass.containsDevice(deviceName)) {
                    final DeviceImpl dev = deviceClass.getDeviceImpl(deviceName);
                    if (type.equalsIgnoreCase(PolledObjectType.ATTRIBUTE.toString())) {
                        logger.debug("remove polling of attribute {} on device {}", attribute, deviceName);
                        dev.removeAttributePolling(attribute);
                    } else {
                        logger.debug("remove polling of command {} on device {}", attribute, deviceName);
                        dev.removeCommandPolling(attribute);
                    }
                }
            }
        }
        xlogger.exit();
    }
55568
@Override
    public Any execute(final DeviceImpl device, final Any in_any) throws DevFailed {
	Util.out4.println("InitCmd::execute(): arrived");

	// Re-initialize the device
	try {
	    device.delete_device();
	    device.init_device();
	} catch (final DevFailed e) {
	    final Util tg = Util.instance();

	    Except.re_throw_exception(e, "API_InitThrowsException", "Init command failed!!\n"
		    + "HINT: RESTART device with the Restart command"
		    + " of the device server adm. device\n"
		    + "Device server adm. device name = dserver/" + tg.get_ds_name(),
		    "InitCmd.execute()");
	}

	// return to the caller
	return Util.return_empty_any("Init");
    }
657473
@Override
    public Map<String, String[]> getDeviceProperties(final String name, final String... propertyNames) throws DevFailed {
        Map<String, String[]> map;
        if (propertyNames.length == 0) {
            map = getProperties(PropertyType.Device, name);
        } else {
            map = getProperty(PropertyType.Device, name, propertyNames);
        }
        return map;
    }
139742
@Init
    @StateMachine(endState = DeviceState.ON)
    public void init() throws DevFailed {
        xlogger.entry();
        TangoCacheManager.setPollSize(pollingThreadsPoolSize);
        // logger.debug("init admin device with quartzThreadsPoolSize = {}",
        // quartzThreadsPoolSize);
        status = "The device is ON\nThe polling is ON";
        tangoStats = TangoStats.getInstance();
        xlogger.exit();
    }
788413
public int subscribe_event(int event, CallBack callback, String[] filters) throws DevFailed {
        return dev.subscribe_event(deviceName, event, callback, filters);
    }
1236491
public void deleteAllDevicePipeProperty(String deviceName, List<String> pipeNames) throws DevFailed {
        databaseDAO.deleteAllDevicePipeProperty(this, deviceName, pipeNames);
    }
1090927
public void removeCommand(final String commandName) throws DevFailed {
        final CommandImpl toRemove = dynamicCommands.get(commandName.toLowerCase(Locale.ENGLISH));
        deviceImpl.removeCommand(toRemove);
        dynamicCommands.remove(commandName);
        deviceImpl.pushInterfaceChangeEvent(false);
    }
468111
public void clearCommands() throws DevFailed {
        for (final CommandImpl cmdImpl : dynamicCommands.values()) {
            deviceImpl.removeCommand(cmdImpl);
        }
        dynamicCommands.clear();
    }
292479
public Any execute(DeviceImpl device, Any in_any) throws DevFailed
	{

		Util.out4.println("PolledDeviceCmd.execute(): arrived ");

		// Call the device method and return to caller
		return insert(((DServer)(device)).polled_device());
	}
1119014
DeviceData command_inout(String command, DeviceData argin) throws DevFailed {
        return tacoDevice.command_inout(this, command, argin);
    }
1163550
public void deleteAllDevicePipeProperty(String deviceName, String[] pipeNames) throws DevFailed {
        ArrayList<String>   list = new ArrayList<String>(pipeNames.length);
        Collections.addAll(list, pipeNames);
        deleteAllDevicePipeProperty(deviceName, list);
    }
453302
public void putPipeProperty(ArrayList<DbPipe> dbPipes) throws DevFailed {
        for (DbPipe dbPipe : dbPipes) database.putDevicePipeProperty(deviceName, dbPipe);
    }
323969
@Override
    public void ping() throws DevFailed {
        MDC.setContextMap(contextMap);
        xlogger.entry();
        deviceMonitoring.startRequest("Operation ping");
        xlogger.exit();
    }
215074
@Override
    public DevCmdInfo command_query(final String commandName) throws DevFailed {
        MDC.setContextMap(contextMap);
        xlogger.entry();
        // checkInitialization();
        deviceMonitoring.startRequest("command_query " + commandName);
        final CommandImpl foundCmd = getCommand(commandName);
        final DevCmdInfo tmp = new DevCmdInfo();
        tmp.cmd_name = foundCmd.getName();
        tmp.cmd_tag = foundCmd.getTag();
        tmp.in_type = foundCmd.getInType().getTangoIDLType();
        tmp.out_type = foundCmd.getOutType().getTangoIDLType();
        tmp.in_type_desc = foundCmd.getInTypeDesc();
        tmp.out_type_desc = foundCmd.getOutTypeDesc();
        return tmp;
    }
855231
@Override
    public void unexportDevices() throws DevFailed {
        xlogger.entry();
        final List<DeviceClassBuilder> clazzToRemove = new ArrayList<DeviceClassBuilder>();
        for (final DeviceClassBuilder clazz : deviceClassList) {
            if (!clazz.getDeviceClass().equals(AdminDevice.class)) {
                for (final DeviceImpl device : clazz.getDeviceImplList()) {
                    logger.debug("unexport device {}", device.getName());
                    ORBUtils.unexportDevice(device);
                }
                clazz.clearDevices();
                clazzToRemove.add(clazz);
            }
        }
        for (final DeviceClassBuilder deviceClassBuilder : clazzToRemove) {
            deviceClassList.remove(deviceClassBuilder);
        }
        // unregisterServer();
        // deviceClassList.clear();
        xlogger.exit();
    }
1043877
public DeviceData command_inout(String command, DeviceData argin) throws DevFailed {
		return iConnection.command_inout(this, command, argin);
	}
165973
public synchronized void startCommandPolling(final CommandImpl command) throws DevFailed {
        addCommandPolling(command);
        LOGGER.debug("starting command {} for polling on device {}", command.getName(), deviceName);
        if (command.getPollingPeriod() != 0) {
            commandCacheMap.get(command).startRefresh(POLLING_POOL);
        }
    }