public void deleteDevice() throws DevFailed {
        MDC.setContextMap(contextMap);
        xlogger.entry();
        PropertiesUtils.clearCache();
        PropertiesUtils.clearDeviceCache(name);
        PropertiesUtils.clearClassCache(className);
        stopPolling();
        pollingManager.removeAll();
        if (deviceScheduler != null) {
            deviceScheduler.stop();
        }
        if (interfaceChangeSender != null) {
            interfaceChangeSender.stop();
        }
        if (deleteMethod != null) {
            try {
                deleteMethod.invoke(businessObject);
            } catch (final IllegalArgumentException e) {
                throw DevFailedUtils.newDevFailed(e);
            } catch (final IllegalAccessException e) {
                throw DevFailedUtils.newDevFailed(e);
            } catch (final InvocationTargetException e) {
                if (e.getCause() instanceof DevFailed) {
                    throw (DevFailed) e.getCause();
                } else {
                    throw DevFailedUtils.newDevFailed(e.getCause());
                }
            }
        }
        xlogger.exit();
    }
public void deleteDevice ( ) throws DevFailed { MDC . setContextMap ( contextMap ) ; xlogger . entry ( ) ; PropertiesUtils . clearCache ( ) ; PropertiesUtils . clearDeviceCache ( name ) ; PropertiesUtils . clearClassCache ( className ) ; stopPolling ( ) ; pollingManager . removeAll ( ) ; if ( deviceScheduler != null ) { deviceScheduler . stop ( ) ; } if ( interfaceChangeSender != null ) { interfaceChangeSender . stop ( ) ; } if ( deleteMethod != null ) { try { deleteMethod . invoke ( businessObject ) ; } catch ( final IllegalArgumentException e ) { throw DevFailedUtils . newDevFailed ( e ) ; } catch ( final IllegalAccessException e ) { throw DevFailedUtils . newDevFailed ( e ) ; } catch ( final InvocationTargetException e ) { if ( e . getCause ( ) instanceof DevFailed ) { throw ( DevFailed ) e . getCause ( ) ; } else { throw DevFailedUtils . newDevFailed ( e . getCause ( ) ) ; } } } xlogger . exit ( ) ; }
Stops polling calls delete method {@link Delete}. Called before init and
at server shutdown

@throws DevFailed