Package java.util.concurrent

Examples of java.util.concurrent.Callable.call()


    public void service(final Request request, final Response response) throws Exception {
        try {
            request.addAfterServiceListener(afterServiceListener);
           
            final Callable handler = lookupHandler(request, response);
            handler.call();
        } catch (Exception ex) {
            try {
                if (LOGGER.isLoggable(Level.WARNING)) {
                    LogHelper.log(LOGGER, Level.WARNING, KernelLoggerInfo.exceptionMapper, ex,
                            request.getRequest().getRequestURIRef().getDecodedRequestURIBC());
View Full Code Here


            }
        };

//        callable = new ScopeActivator(callable, ApplicationScoped.class);
//        callable = new ScopeActivator(callable, RequestScoped.class);
        return callable.call();
    }

    public class ScopeActivator implements Callable {
        private final Callable callable;
        private final Class<? extends Annotation> scopeType;
View Full Code Here

                    for( String id : idrefs ) {
                        Callable callable = context.getObjectFromId(id,itemType);
                        Object t;

                        try {
                            t = (callable!=null) ? callable.call() : null;
                        } catch (SAXException e) {
                            throw e;
                        } catch (Exception e) {
                            throw new SAXException2(e);
                        }
View Full Code Here

                return;
            }

            TargetT t;
            try {
                t = (TargetT)callable.call();
            } catch (SAXException e) {// from callable.call
                throw e;
            } catch (RuntimeException e) {// from callable.call
                throw e;
            } catch (Exception e) {// from callable.call
View Full Code Here

                // try again later
                final LocatorEx loc = new LocatorEx.Snapshot(context.getLocator());
                context.addPatcher(new Patcher() {
                    public void run() throws SAXException {
                        try {
                            TargetT t = (TargetT)callable.call();
                            if(t==null) {
                                context.errorUnresolvedIDREF(bean,idref,loc);
                            } else {
                                assign(bean,t,context);
                            }
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.