/collection-plugins/mongodb/src/main/java/com/springsource/insight/plugin/mongodb/MongoDBPluginRuntimeDescriptor.java

https://github.com/spring-projects/spring-insight-plugins · Java · 54 lines · 31 code · 8 blank · 15 comment · 0 complexity · 5e2b7aca4f4395adc1ed3d3767166a91 MD5 · raw file

  1. /**
  2. * Copyright (c) 2009-2011 VMware, Inc. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package com.springsource.insight.plugin.mongodb;
  17. import java.util.Collection;
  18. import java.util.List;
  19. import com.springsource.insight.intercept.plugin.PluginRuntimeDescriptor;
  20. import com.springsource.insight.intercept.topology.ExternalResourceAnalyzer;
  21. import com.springsource.insight.util.ArrayUtil;
  22. public class MongoDBPluginRuntimeDescriptor extends PluginRuntimeDescriptor {
  23. public static final String PLUGIN_NAME = "mongodb";
  24. private static final MongoDBPluginRuntimeDescriptor INSTANCE = new MongoDBPluginRuntimeDescriptor();
  25. private static final List<? extends ExternalResourceAnalyzer> extResAnalyzers =
  26. ArrayUtil.asUnmodifiableList(MongoDBCollectionExternalResourceAnalyzer.getInstance(),
  27. MongoDBOperationExternalResourceAnalyzer.getInstance());
  28. private MongoDBPluginRuntimeDescriptor() {
  29. super();
  30. }
  31. public static final MongoDBPluginRuntimeDescriptor getInstance() {
  32. return INSTANCE;
  33. }
  34. @Override
  35. public String getPluginName() {
  36. return PLUGIN_NAME;
  37. }
  38. @Override
  39. public Collection<? extends ExternalResourceAnalyzer> getExternalResourceAnalyzers() {
  40. return extResAnalyzers;
  41. }
  42. @Override
  43. public String getPublisher() {
  44. return "Stephen Harrison (stephen@harrison.org) and the Insight Team";
  45. }
  46. }