src/main/java/com/ning/metrics/goodwill/access/GoodwillAccessor.java
public Future<List<GoodwillSchema>> getSchemata()
    {
        try {
            return client.prepareGet(url).addHeader("Accept", "application/json").execute(new AsyncCompletionHandler<List<GoodwillSchema>>()
            {
                @Override
                public List<GoodwillSchema> onCompleted(final Response response) throws Exception
                {
                    if (response.getStatusCode() != 200) {
                        return null;
                    }

                    InputStream in = response.getResponseBodyAsStream();
                    try {
                        final HashMap<String, List<GoodwillSchema>> map = mapper.readValue(in,
                            new TypeReference<HashMap<String, List<GoodwillSchema>>>()
                            {
                            });
                        return map.get("types");
                    }
                    finally {
                        closeStream(in);
                    }
                }

                @Override
                public void onThrowable(final Throwable t)
                {
                    log.warn("Got exception looking up the schema list", t);
                }
            });
        }
        catch (IOException e) {
            log.warn("Got exception looking up the schema list", e);
            return null;
        }
    }
public Future<List<GoodwillSchema>> getSchemata()
    {
        try {
            return client.prepareGet(url).addHeader("Accept", "application/json").execute(new AsyncCompletionHandler<List<GoodwillSchema>>()
            {
                @Override
                public List<GoodwillSchema> onCompleted(final Response response) throws Exception
                {
                    if (response.getStatusCode() != 200) {
                        return null;
                    }

                    InputStream in = response.getResponseBodyAsStream();
                    try {
                        final HashMap<String, List<GoodwillSchema>> map = mapper.readValue(in,
                            new TypeReference<HashMap<String, List<GoodwillSchema>>>()
                            {
                            });
                        return map.get("types");
                    }
                    finally {
                        closeStream(in);
                    }
                }

                @Override
                public void onThrowable(final Throwable t)
                {
                    log.warn("Got exception looking up the schema list", t);
                }
            });
        }
        catch (IOException e) {
            log.warn("Got exception looking up the schema list", e);
            return null;
        }
    }
public Future < List < GoodwillSchema > > getSchemata ( ) { try { return client . prepareGet ( url ) . addHeader ( "Accept" , "application/json" ) . execute ( new AsyncCompletionHandler < List < GoodwillSchema > > ( ) { @ Override public List < GoodwillSchema > onCompleted ( final Response response ) throws Exception { if ( response . getStatusCode ( ) != 200 ) { return null ; } InputStream in = response . getResponseBodyAsStream ( ) ; try { final HashMap < String , List < GoodwillSchema > > map = mapper . readValue ( in , new TypeReference < HashMap < String , List < GoodwillSchema > > > ( ) { } ) ; return map . get ( "types" ) ; } finally { closeStream ( in ) ; } } @ Override public void onThrowable ( final Throwable t ) { log . warn ( "Got exception looking up the schema list" , t ) ; } } ) ; } catch ( IOException e ) { log . warn ( "Got exception looking up the schema list" , e ) ; return null ; } }
Get all schemata.
<p/>
Use schemata, instead of schemas, which is closer to the original σχήματα.

@return a future on a list of Schema
@see #getSchema(String) for an invocation example
Get all schemata . <p / > Use schemata instead of schemas which is closer to the original σχήματα .