@Override
    public void startup() throws LifeCycleException {
        super.startup();

        scheduledService = new ScheduledThreadPoolExecutor(1, new NamedThreadFactory(
            "RpcTaskScannerThread", true));
        scheduledService.scheduleWithFixedDelay(new Runnable() {

            @Override
            public void run() {
                for (Scannable scanned : scanList) {
                    try {
                        scanned.scan();
                    } catch (Throwable t) {
                        logger.error("Exception caught when scannings.", t);
                    }
                }
            }

        }, 10000, 10000, TimeUnit.MILLISECONDS);
    }
Scanner is used to do scan task.

@author jiangping
@version $Id: RpcTaskScanner.java, v 0.1 Mar 4, 2016 3:30:52 PM tao Exp $
src/main/java/com/alipay/remoting/rpc/RpcTaskScanner.java