Examples of AsyncHandler


Examples of org.jboss.logmanager.handlers.AsyncHandler

        }
        if (valueToRemove != null) {

            subhandlers.remove(valueToRemove);

            final AsyncHandler handler = getValue();
            if (handler != null) {
                handler.removeHandler(valueToRemove.getValue());
            }
        }
    }
View Full Code Here

Examples of org.jboss.logmanager.handlers.AsyncHandler

    private FormatterSpec formatterSpec;
    private String encoding;
    private boolean autoflush;

    public synchronized void start(final StartContext context) throws StartException {
        final AsyncHandler handler = new AsyncHandler(queueLength);
        value = handler;
        formatterSpec.apply(handler);
        handler.setOverflowAction(overflowAction);
        handler.setAutoFlush(autoflush);
        if (filter != null) handler.setFilter(filter);
        try {
            handler.setEncoding(encoding);
        } catch (UnsupportedEncodingException e) {
            throw new StartException(e);
        }
        Handler[] handlers = new Handler[subhandlers.size()];
        for (int i = 0, subhandlersSize = subhandlers.size(); i < subhandlersSize; i++) {
            handlers[i] = subhandlers.get(i).getValue();
        }
        handler.setHandlers(handlers);
        if (level != null) handler.setLevel(level);
    }
View Full Code Here

Examples of org.jboss.logmanager.handlers.AsyncHandler

        handler.setHandlers(handlers);
        if (level != null) handler.setLevel(level);
    }

    public synchronized void stop(final StopContext context) {
        final AsyncHandler handler = value;
        handler.close();
        handler.setLevel(Level.OFF);
        handler.clearHandlers();
        value = null;
    }
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.