Package com.google.common.base

Examples of com.google.common.base.Supplier


        }

        @Override
        protected Object getFallback() {
            if (fallback.isPresent()) {
                Supplier supplier = fallback.get();
                return supplier.get();
            }
            Throwable e = getFailedExecutionException();
            LOG.debug("No fallback with exception", e);
            throw new UnsupportedOperationException("No fallback available for "+name, e);
        }
View Full Code Here


                                        @Override
                                        public Object call() throws Exception {
                                            return getCreator(dep.getKey()).get();
                                        }
                                    });
                                    suppliers.add(new Supplier() {
                                        @Override
                                        public Object get() {
                                            try {
                                                return future.get();
                                            } catch (InterruptedException e) {
View Full Code Here

            descriptor()         // serve the descriptor when accept header is 'application/xml', try 'curl -H "Accept: application/xml" http://localhost:9000'
        );
    }

    private static Supplier descriptor() {
        return new Supplier() {
            @Override
            public Result get() {
                return ok(views.xml.descriptor.render());
            }
        };
View Full Code Here

TOP

Related Classes of com.google.common.base.Supplier

Copyright © 2018 www.massapicom. 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.