public void run() {   
                MessageHandler<E> p = null;   
                try {   
                    p = c.newInstance();   
                } catch (InstantiationException e1) {   
                    // TODO Auto-generated catch block   
                    e1.printStackTrace();   
                } catch (IllegalAccessException e1) {   
                    // TODO Auto-generated catch block   
                    e1.printStackTrace();   
                }   
                //    
                int i = 0;   
                while(true){   
                    try {   
                        if (!queue.isEmpty()) {   
                            p.consume(queue.poll());   
                        }   
                        i++;   
                    } catch (Exception e) {   
                        e.printStackTrace();   
                    }   
                    // 每执行100次   
                    if(10==i){   
                        synchronized (this) {   
                            try {   
                                i = 0;   
                                wait(100);   
                            } catch (InterruptedException e) {   
                                e.printStackTrace();   
                            }   
                        }                               
                    }   
                }   
            }