public boolean submit(ConnectContext context) {
        if (context == null) {
            return false;
        }

        context.setConnectionId(nextConnectionId.getAndAdd(1));
        context.resetConnectionStartTime();
        // no necessary for nio or Http.
        if (context instanceof NConnectContext || context instanceof HttpConnectContext) {
            return true;
        }
        if (executor.submit(new LoopHandler(context)) == null) {
            LOG.warn("Submit one thread failed.");
            return false;
        }
        return true;
    }
@Test
    public void testSubmitTooMany() throws InterruptedException {
        ConnectScheduler scheduler = new ConnectScheduler(0);
        ConnectContext context = new ConnectContext(socketChannel);
        Assert.assertTrue(scheduler.submit(context));
    }