code: private void poll_object(final DeviceProxy deviceProxy, final String objectName,
  	    	final String objectType, final int period) throws DevFailed {
  		final DevVarLongStringArray lsa = new DevVarLongStringArray();
  		lsa.lvalue = new int[1];
  		lsa.svalue = new String[3];
  		lsa.svalue[0] = deviceProxy.devname;
  		lsa.svalue[1] = objectType;
  		lsa.svalue[2] = objectName.toLowerCase();
  		lsa.lvalue[0] = period;
  
  		// Send command on administration device.
  		if (deviceProxy.getAdm_dev() == null) {
  	    	import_admin_device(deviceProxy, "poll_object");
  		}
  		if (DeviceProxy.isCheck_idl() && deviceProxy.getAdm_dev().get_idl_version() < 2) {
  	    	Except.throw_non_supported_exception("TangoApi_IDL_NOT_SUPPORTED",
  		    	"Not supported by the IDL version used by device", deviceProxy
  			    	.getFull_class_name()
  			    	+ ".poll_object()");
  		}
  
  		final DeviceData argin = new DeviceData();
  		argin.insert(lsa);
  
  		// Try to add polling period.
  		try {
  	    	deviceProxy.getAdm_dev().command_inout("AddObjPolling", argin);
  		} catch (final DevFailed e) {
  	    	// check : if already polled, just update period polling
  	    	for (final DevError error : e.errors) {
  				if (error.reason.equals("API_AlreadyPolled")) {
  		    		deviceProxy.getAdm_dev().command_inout("UpdObjPollingPeriod", argin);
  		    		return;
  				}
  	    	}
  	    	// Not this exception then re-throw it
  	    	Except.throw_communication_failed(e, "TangoApi_CANNOT_POLL_OBJECT",
  		    	"Cannot poll object " + objectName, deviceProxy.getFull_class_name()
  			    	+ ".poll_object()");
  		}
      }
docs: ==========================================================================