Skip to content

Instantly share code, notes, and snippets.

@jeanouii
Created August 5, 2014 17:02
Show Gist options
  • Select an option

  • Save jeanouii/08d9d9085d824daf2f2b to your computer and use it in GitHub Desktop.

Select an option

Save jeanouii/08d9d9085d824daf2f2b to your computer and use it in GitHub Desktop.
private Response handleMetadataRequest(Message m) {
List<ProviderInfo<RequestHandler>> shs = ProviderFactory.getInstance(m).getRequestHandlers();
// this is actually being tested by ProviderFactory unit tests but just in case
// WadlGenerator, the custom or default one, must be the first one
if (shs.size() > 0 && shs.get(0).getProvider() instanceof WadlGenerator) {
return shs.get(0).getProvider().handleRequest(m, null);
} else {
return null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment