getHandlerCollection().addHandler(handler);
if (getHandler() instanceof HandlerCollection) ((HandlerCollection)getHandler()).addHandler(handler); else { HandlerCollection collection=new HandlerCollection(); collection.setHandlers(new Handler[]{getHandler(),handler}); setHandler(collection); }
    public void addHandler(Handler handler)    {        getHandlerCollection().addHandler(handler);    }