Package java.util.concurrent

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


                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

    when( securityHelper.runAsSystem( any( Callable.class ) ) ).thenAnswer( new Answer<Object>() {
      @Override
      public Object answer( InvocationOnMock invocation ) throws Throwable {
        final Callable callable = (Callable) invocation.getArguments()[0];
        if ( callable != null ) {
          return callable.call();
        }
        return null;
      }
    } );
    SecurityHelper.setMockInstance( securityHelper );
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

                    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

                    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

                                    c = userSpecifiedResolver.resolve(idWrapper, reference.getTargetClass());
                                } else {
                                    c = userSpecifiedResolver.resolve(primaryKey.getPrimaryKey()[0], reference.getTargetClass());
                                }
                                if (c != null) {
                                    value = c.call();
                                }
                            } catch (Exception e) {
                                throw XMLMarshalException.unmarshalException(e);
                            }
                        } else {
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.