Examples of Borning


Examples of org.nutz.lang.born.Borning

                }
            }).start();
            /*
             * 准备 SocketAtom 的生成器
             */
            Borning borning = Mirror.me(klass).getBorningByArgTypes(Context.class,
                                                                    Socket.class,
                                                                    SocketActionTable.class);
            if (borning == null) {
                log.error("boring == null !!!!");
                return;
            }
            /*
             * 进入监听循环
             */
            while (!context.getBoolean("stop")) {
                try {
                    if (log.isDebugEnabled())
                        log.debug("Waiting for new socket");
                    Socket socket = server.accept();
                    if (context.getBoolean("stop")) {
                        Sockets.safeClose(socket);
                        break;// 监护线程也许还是睡觉,还没来得及关掉哦,所以自己检查一下
                    }
                    if (log.isDebugEnabled())
                        log.debug("accept a new socket, create new SocketAtom to handle it ...");
                    Runnable runnable = (Runnable) borning.born(new Object[]{    context,
                                                                                socket,
                                                                                saTable});
                    service.execute(runnable);
                }
                catch (Throwable e) {
View Full Code Here

Examples of org.nutz.lang.born.Borning

                }
            }).start();
            /*
             * 准备 SocketAtom 的生成器
             */
            Borning borning = Mirror.me(klass).getBorningByArgTypes(Context.class,
                                                                    Socket.class,
                                                                    SocketActionTable.class);
            if (borning == null) {
                log.error("boring == null !!!!");
                return;
            }
            /*
             * 进入监听循环
             */
            while (!context.getBoolean("stop")) {
                try {
                    if (log.isDebugEnabled())
                        log.debug("Waiting for new socket");
                    Socket socket = server.accept();
                    if (context.getBoolean("stop")) {
                        Sockets.safeClose(socket);
                        break;// 监护线程也许还是睡觉,还没来得及关掉哦,所以自己检查一下
                    }
                    if (log.isDebugEnabled())
                        log.debug("accept a new socket, create new SocketAtom to handle it ...");
                    Runnable runnable = (Runnable) borning.born(new Object[]{    context,
                                                                                socket,
                                                                                saTable});
                    service.execute(runnable);
                }
                catch (Throwable e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.